diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-30 15:08:26 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-30 15:08:26 +0300 |
| commit | cd4846c5a68da77705164924f47001af3b499dec (patch) | |
| tree | 226295e35148ee7a9d303c6a218790b7a8107976 /fs/ecryptfs/file.c | |
| parent | 9ee84466b7130360d07241baf4c95a553fc0a997 (diff) | |
| parent | 6da6c0db5316275015e8cc2959f12a17584aeb64 (diff) | |
| download | linux-cd4846c5a68da77705164924f47001af3b499dec.tar.xz | |
Merge 4.17-rc3 into driver-core-next
We want the fixes in here as well for testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ecryptfs/file.c')
| -rw-r--r-- | fs/ecryptfs/file.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index c74ed3ca3372..b76a9853325e 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c @@ -82,17 +82,28 @@ ecryptfs_filldir(struct dir_context *ctx, const char *lower_name, buf->sb, lower_name, lower_namelen); if (rc) { - printk(KERN_ERR "%s: Error attempting to decode and decrypt " - "filename [%s]; rc = [%d]\n", __func__, lower_name, - rc); - goto out; + if (rc != -EINVAL) { + ecryptfs_printk(KERN_DEBUG, + "%s: Error attempting to decode and decrypt filename [%s]; rc = [%d]\n", + __func__, lower_name, rc); + return rc; + } + + /* Mask -EINVAL errors as these are most likely due a plaintext + * filename present in the lower filesystem despite filename + * encryption being enabled. One unavoidable example would be + * the "lost+found" dentry in the root directory of an Ext4 + * filesystem. + */ + return 0; } + buf->caller->pos = buf->ctx.pos; rc = !dir_emit(buf->caller, name, name_size, ino, d_type); kfree(name); if (!rc) buf->entries_written++; -out: + return rc; } |
