Commit b134079f authored by Fabian Frederick's avatar Fabian Frederick Committed by Linus Torvalds
Browse files

fs/exofs/ore_raid.c: replace count*size kzalloc by kcalloc



kcalloc manages count*sizeof overflow.

Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Acked-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e5eea098
......@@ -116,7 +116,7 @@ static int _sp2d_alloc(unsigned pages_in_unit, unsigned group_width,
num_a1pa = min_t(unsigned, PAGE_SIZE / sizeof__a1pa,
pages_in_unit - i);
__a1pa = kzalloc(num_a1pa * sizeof__a1pa, GFP_KERNEL);
__a1pa = kcalloc(num_a1pa, sizeof__a1pa, GFP_KERNEL);
if (unlikely(!__a1pa)) {
ORE_DBGMSG("!! Failed to _alloc_1p_arrays=%d\n",
num_a1pa);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment