kcalloc manages count*sizeof overflow. Cc: Jaegeuk Kim <jaegeuk....@samsung.com> Cc: linux-f2fs-de...@lists.sourceforge.net Signed-off-by: Fabian Frederick <f...@skynet.be> --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index f25f0e0..96f51d4 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1702,7 +1702,7 @@ static int build_curseg(struct f2fs_sb_info *sbi) struct curseg_info *array; int i; - array = kzalloc(sizeof(*array) * NR_CURSEG_TYPE, GFP_KERNEL); + array = kcalloc(NR_CURSEG_TYPE, sizeof(*array), GFP_KERNEL); if (!array) return -ENOMEM; -- 1.8.4.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/