ecryptfs-devel team mailing list archive
-
ecryptfs-devel team
-
Mailing list archive
-
Message #00138
[PATCH 1/3] EcryptFS: zalloc private dentry_info_cache entries
dentry_info_cache entries allocated by ecryptfs_lookup_and_interpose_lower
aren't zalloced where dentry_info_cache entries allocated by ecryptfs
mount are.
Since this tripped me up while debugging, make sure dentry_info_cache_entries
entries are cleared when allocated.
Signed-off-by: John Johansen <john.johansen@xxxxxxxxxxxxx>
---
fs/ecryptfs/inode.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index bd33f87..eba14c5 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -260,7 +260,7 @@ int ecryptfs_lookup_and_interpose_lower(struct dentry *ecryptfs_dentry,
fsstack_copy_attr_atime(ecryptfs_dir_inode, lower_dir_dentry->d_inode);
BUG_ON(!lower_dentry->d_count);
ecryptfs_set_dentry_private(ecryptfs_dentry,
- kmem_cache_alloc(ecryptfs_dentry_info_cache,
+ kmem_cache_zalloc(ecryptfs_dentry_info_cache,
GFP_KERNEL));
if (!ecryptfs_dentry_to_private(ecryptfs_dentry)) {
rc = -ENOMEM;
--
1.7.1
References