[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <50D7E815.6050503@asianux.com>
Date: Mon, 24 Dec 2012 13:28:53 +0800
From: Chen Gang <gang.chen@...anux.com>
To: jack@...e.cz, akpm@...ux-foundation.org
CC: linux-ext4@...r.kernel.org
Subject: [PATCH] fs/ext3: use kzalloc instead of kmalloc
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@...anux.com>
---
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists