diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-08-07 01:03:50 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-07 03:01:13 +0200 |
commit | 14694888db2c1f7ba1f2e6172df45813b4db7880 (patch) | |
tree | 72fdad7dc1fc6c795ac6daaa73235cd8752cca3a /fs | |
parent | sh: fix build error by adding generic ioport_{map/unmap}() (diff) | |
download | linux-14694888db2c1f7ba1f2e6172df45813b4db7880.tar.xz linux-14694888db2c1f7ba1f2e6172df45813b4db7880.zip |
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')
-rw-r--r-- | fs/squashfs/file_direct.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/squashfs/file_direct.c b/fs/squashfs/file_direct.c index 62a0de6632e1..43e7a7eddac0 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; |