block/partitions/aix.c: replace count*size kzalloc by kcalloc
authorFabian Frederick <fabf@skynet.be>
Thu, 12 Jun 2014 17:45:17 +0000 (19:45 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 1 Jul 2014 16:40:00 +0000 (10:40 -0600)
kcalloc manages count*sizeof overflow.

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/partitions/aix.c

index 43be471..0a6ed54 100644 (file)
@@ -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))) {