diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-06-12 13:45:17 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-07-01 12:40:00 -0400 |
commit | 472d5e2af28cc6ae9749ce22f951ea426fdfc392 (patch) | |
tree | 074cb0c5431e54aaf7b14af4e7eaaec59cd9974b /block/partitions/aix.c | |
parent | cbcd1054a1fd2aa980fc11ff28e436fc4aaa2d54 (diff) |
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/aix.c')
-rw-r--r-- | block/partitions/aix.c | 2 |
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) | |||
215 | numlvs = be16_to_cpu(p->numlvs); | 215 | numlvs = be16_to_cpu(p->numlvs); |
216 | put_dev_sector(sect); | 216 | put_dev_sector(sect); |
217 | } | 217 | } |
218 | lvip = kzalloc(sizeof(struct lv_info) * state->limit, GFP_KERNEL); | 218 | lvip = kcalloc(state->limit, sizeof(struct lv_info), GFP_KERNEL); |
219 | if (!lvip) | 219 | if (!lvip) |
220 | return 0; | 220 | return 0; |
221 | if (numlvs && (d = read_part_sector(state, vgda_sector + 1, §))) { | 221 | if (numlvs && (d = read_part_sector(state, vgda_sector + 1, §))) { |