diff options
-rw-r--r-- | MAINTAINERS | 2 | ||||
-rw-r--r-- | fs/ecryptfs/inode.c | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index c4bdd50e670b..4c0135b70cae 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22283,7 +22283,7 @@ F: drivers/usb/common/ulpi.c F: include/linux/ulpi/ UNICODE SUBSYSTEM -M: Gabriel Krisman Bertazi <krisman@collabora.com> +M: Gabriel Krisman Bertazi <krisman@kernel.org> L: linux-fsdevel@vger.kernel.org S: Supported F: fs/unicode/ diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index b0e8774c435a..d7193687b9b4 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -78,6 +78,14 @@ static struct inode *__ecryptfs_get_inode(struct inode *lower_inode, if (lower_inode->i_sb != ecryptfs_superblock_to_lower(sb)) return ERR_PTR(-EXDEV); + + /* Reject dealing with casefold directories. */ + if (IS_CASEFOLDED(lower_inode)) { + pr_err_ratelimited("%s: Can't handle casefolded directory.\n", + __func__); + return ERR_PTR(-EREMOTE); + } + if (!igrab(lower_inode)) return ERR_PTR(-ESTALE); inode = iget5_locked(sb, (unsigned long)lower_inode, |