author: Kees Cook <keescook@chromium.org> 2018-06-12 13:55:00 -0700
committer: Kees Cook <keescook@chromium.org> 2018-06-12 16:19:22 -0700
commit: 6da2ec56059c3c7a7e5f729e6349e74ace1e5c57
parent: 1c542f38ab8d30d9c852a16d49ac5a15267bbf1f
Commit Summary:
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
index 2cfe487708e0..c6821a509481 100644
--- a/fs/jffs2/wbuf.c
+++ b/fs/jffs2/wbuf.c
@@ -1208,7 +1208,7 @@ int jffs2_nand_flash_setup(struct jffs2_sb_info *c)
if (!c->wbuf)
return -ENOMEM;
- c->oobbuf = kmalloc(NR_OOB_SCAN_PAGES * c->oobavail, GFP_KERNEL);
+ c->oobbuf = kmalloc_array(NR_OOB_SCAN_PAGES, c->oobavail, GFP_KERNEL);
if (!c->oobbuf) {
kfree(c->wbuf);
return -ENOMEM;