From: Fabian Frederick Date: Wed, 25 Jun 2014 18:40:45 +0000 (+0200) Subject: GFS2: replace count*size kzalloc by kcalloc X-Git-Tag: v4.9.8~6086^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ec43b1838bd71633ac3f853c63ddf1f5940b1ed;p=platform%2Fkernel%2Flinux-rpi3.git GFS2: replace count*size kzalloc by kcalloc kcalloc manages count*sizeof overflow. Cc: cluster-devel@redhat.com Signed-off-by: Fabian Frederick Signed-off-by: Steven Whitehouse --- diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c index 91f274d..4fafea1 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, new_size = old_size + RECOVER_SIZE_INC; - submit = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS); - result = kzalloc(new_size * sizeof(uint32_t), GFP_NOFS); + submit = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS); + result = kcalloc(new_size, sizeof(uint32_t), GFP_NOFS); if (!submit || !result) { kfree(submit); kfree(result);