projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8f52d8
)
fs/omfs/inode.c: replace count*size kzalloc by kcalloc
author
Fabian Frederick
<fabf@skynet.be>
Fri, 8 Aug 2014 21:22:41 +0000
(14:22 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Fri, 8 Aug 2014 22:57:25 +0000
(15:57 -0700)
kcalloc manages count*sizeof overflow.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/omfs/inode.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/omfs/inode.c
b/fs/omfs/inode.c
index ec58c765918365f1cb32555b745fb2503cf7253e..ba8819702c56719ae8a1a7b4596662a653a6ef0b 100644
(file)
--- a/
fs/omfs/inode.c
+++ b/
fs/omfs/inode.c
@@
-321,7
+321,7
@@
static int omfs_get_imap(struct super_block *sb)
goto out;
sbi->s_imap_size = array_size;
- sbi->s_imap = k
zalloc(array_size *
sizeof(unsigned long *), GFP_KERNEL);
+ sbi->s_imap = k
calloc(array_size,
sizeof(unsigned long *), GFP_KERNEL);
if (!sbi->s_imap)
goto nomem;