projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5714156
)
orangefs: switch decode_dirents() to use of kcalloc()
author
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 9 Oct 2015 17:23:16 +0000
(13:23 -0400)
committer
Mike Marshall
<hubcap@omnibond.com>
Fri, 13 Nov 2015 16:55:39 +0000
(11:55 -0500)
gets rid of multiplication overflow
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/dir.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/orangefs/dir.c
b/fs/orangefs/dir.c
index daf497384501c9322d72d089092abeb44e8804fd..280755db181495b81b8677a2817f9f26afc4e234 100644
(file)
--- a/
fs/orangefs/dir.c
+++ b/
fs/orangefs/dir.c
@@
-27,7
+27,7
@@
static long decode_dirents(char *ptr, struct pvfs2_readdir_response_s *readdir)
readdir->token = rd->token;
readdir->pvfs_dirent_outcount = rd->pvfs_dirent_outcount;
- readdir->dirent_array = k
malloc(readdir->pvfs_dirent_outcount *
+ readdir->dirent_array = k
calloc(readdir->pvfs_dirent_outcount,
sizeof(*readdir->dirent_array),
GFP_KERNEL);
if (readdir->dirent_array == NULL)