diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-06-25 14:40:45 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2014-07-18 06:13:38 -0400 |
commit | 6ec43b1838bd71633ac3f853c63ddf1f5940b1ed (patch) | |
tree | 120d5361ccec503780222238ffac5749c5ba079a /fs/gfs2/lock_dlm.c | |
parent | fe0bbd2986996b9efe3a78bf5a591b0496c7afea (diff) |
GFS2: replace count*size kzalloc by kcalloc
kcalloc manages count*sizeof overflow.
Cc: cluster-devel@redhat.com
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/lock_dlm.c')
-rw-r--r-- | fs/gfs2/lock_dlm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c index 91f274de1246..4fafea1c9ecf 100644 --- a/fs/gfs2/lock_dlm.c +++ b/fs/gfs2/lock_dlm.c | |||
@@ -1036,8 +1036,8 @@ static int set_recover_size(struct gfs2_sbd *sdp, struct dlm_slot *slots, | |||
1036 | 1036 | ||
1037 | new_size = old_size + RECOVER_SIZE_INC; | 1037 | new_size = old_size + RECOVER_SIZE_INC; |
1038 | 1038 | ||
1039 | submit = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS); | 1039 | submit = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS); |
1040 | result = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS); | 1040 | result = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS); |
1041 | if (!submit || !result) { | 1041 | if (!submit || !result) { |
1042 | kfree(submit); | 1042 | kfree(submit); |
1043 | kfree(result); | 1043 | kfree(result); |