better to use kzalloc instead of kmalloc. if acl_e->e_tag is neither ACL_USER, nor ACL_GROUP. entry->e_id will not be initialized we can not say it is a bug, but suggest to initialize it, too. Signed-off-by: Chen Gang <gang.chen@xxxxxxxxxxx> --- fs/ext3/acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext3/acl.c b/fs/ext3/acl.c index dbb5ad5..5121c5b 100644 --- a/fs/ext3/acl.c +++ b/fs/ext3/acl.c @@ -91,7 +91,7 @@ ext3_acl_to_disk(const struct posix_acl *acl, size_t *size) size_t n; *size = ext3_acl_size(acl->a_count); - ext_acl = kmalloc(sizeof(ext3_acl_header) + acl->a_count * + ext_acl = kzalloc(sizeof(ext3_acl_header) + acl->a_count * sizeof(ext3_acl_entry), GFP_NOFS); if (!ext_acl) return ERR_PTR(-ENOMEM); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html