summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-08-08 23:22:18 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-09 00:57:24 +0200
commitb134079f1f4691a0e271211aefad757c5380cec7 (patch)
treedc9905b1e21729e4738bb771831af2a1782f3014
parentsysctl: remove typedef ctl_table (diff)
downloadlinux-b134079f1f4691a0e271211aefad757c5380cec7.tar.xz
linux-b134079f1f4691a0e271211aefad757c5380cec7.zip
fs/exofs/ore_raid.c: replace count*size kzalloc by kcalloc
kcalloc manages count*sizeof overflow. Signed-off-by: Fabian Frederick <fabf@skynet.be> Acked-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/exofs/ore_raid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exofs/ore_raid.c b/fs/exofs/ore_raid.c
index 7f20f25c232c..84529b8a331b 100644
--- a/fs/exofs/ore_raid.c
+++ b/fs/exofs/ore_raid.c
@@ -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);