aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-08-06 16:03:50 -0700
committerMister Oyster <oysterized@gmail.com>2017-04-11 11:00:19 +0200
commit81eeff0819b2037f2e721a0bfa85a44b4cddc75d (patch)
treebeeab9a0c152f5441cc171c41d5ab05464f3265d /fs
parent48c6575245ade540c7d257fd943bcfe7755f8037 (diff)
fs/squashfs/file_direct.c: replace count*size kmalloc by kmalloc_array
kmalloc_array() manages count*sizeof overflow. Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: Phillip Lougher <phillip@squashfs.org.uk> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Change-Id: I625d688316193f1e1f7d32e715c9fecb57b58356
Diffstat (limited to 'fs')
-rw-r--r--fs/squashfs/file_direct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/squashfs/file_direct.c b/fs/squashfs/file_direct.c
index 62a0de663..43e7a7edd 100644
--- a/fs/squashfs/file_direct.c
+++ b/fs/squashfs/file_direct.c
@@ -44,7 +44,7 @@ int squashfs_readpage_block(struct page *target_page, u64 block, int bsize)
pages = end_index - start_index + 1;
- page = kmalloc(sizeof(void *) * pages, GFP_KERNEL);
+ page = kmalloc_array(pages, sizeof(void *), GFP_KERNEL);
if (page == NULL)
return res;