kcalloc manages count*sizeof overflow.
Cc: Miklos Szeredi <[email protected]>
Cc: [email protected]
Signed-off-by: Fabian Frederick <[email protected]>
---
fs/fuse/file.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 6e16dad..ce7d55c 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1955,8 +1955,8 @@ static int fuse_writepages(struct address_space *mapping,
data.ff = NULL;
err = -ENOMEM;
- data.orig_pages = kzalloc(sizeof(struct page *) *
- FUSE_MAX_PAGES_PER_REQ,
+ data.orig_pages = kcalloc(FUSE_MAX_PAGES_PER_REQ,
+ sizeof(struct page *),
GFP_NOFS);
if (!data.orig_pages)
goto out;
--
1.8.4.5