Commit 472d5e2a authored by Fabian Frederick's avatar Fabian Frederick Committed by Jens Axboe
Browse files

block/partitions/aix.c: replace count*size kzalloc by kcalloc



kcalloc manages count*sizeof overflow.

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent cbcd1054
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ int aix_partition(struct parsed_partitions *state)
		numlvs = be16_to_cpu(p->numlvs);
		put_dev_sector(sect);
	}
	lvip = kzalloc(sizeof(struct lv_info) * state->limit, GFP_KERNEL);
	lvip = kcalloc(state->limit, sizeof(struct lv_info), GFP_KERNEL);
	if (!lvip)
		return 0;
	if (numlvs && (d = read_part_sector(state, vgda_sector + 1, &sect))) {