summaryrefslogtreecommitdiffstats
path: root/fs/squashfs
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-08-06 16:03:50 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-06 18:01:13 -0700
commit14694888db2c1f7ba1f2e6172df45813b4db7880 (patch)
tree72fdad7dc1fc6c795ac6daaa73235cd8752cca3a /fs/squashfs
parente04aca4a769e16cf4f9b8a4bd3e761711640dc46 (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>
Diffstat (limited to 'fs/squashfs')
-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 62a0de6632e..43e7a7eddac 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;