projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e04aca4
)
fs/squashfs/file_direct.c: replace count*size kmalloc by kmalloc_array
author
Fabian Frederick
<fabf@skynet.be>
Wed, 6 Aug 2014 23:03:50 +0000
(16:03 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Thu, 7 Aug 2014 01:01:13 +0000
(18:01 -0700)
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>
fs/squashfs/file_direct.c
patch
|
blob
|
history
diff --git
a/fs/squashfs/file_direct.c
b/fs/squashfs/file_direct.c
index
62a0de6
..
43e7a7e
100644
(file)
--- 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;