summaryrefslogtreecommitdiffstats
path: root/block/partitions
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-12 19:45:17 +0200
committerJens Axboe <axboe@fb.com>2014-07-01 10:40:00 -0600
commit472d5e2af28cc6ae9749ce22f951ea426fdfc392 (patch)
tree074cb0c5431e54aaf7b14af4e7eaaec59cd9974b /block/partitions
parentcbcd1054a1fd2aa980fc11ff28e436fc4aaa2d54 (diff)
downloadlinux-472d5e2af28cc6ae9749ce22f951ea426fdfc392.tar.bz2
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: Fabian Frederick <fabf@skynet.be> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/partitions')
-rw-r--r--block/partitions/aix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/partitions/aix.c b/block/partitions/aix.c
index 43be471d9b1d..0a6ed546331d 100644
--- a/block/partitions/aix.c
+++ b/block/partitions/aix.c
@@ -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))) {