summaryrefslogtreecommitdiffstats
path: root/fs/fuse
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-23 18:35:15 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2014-07-14 16:30:25 +0200
commitf2b3455e47c72bef80fe584adb9bb9bc5afdd99c (patch)
tree5ed3bd4fd4c423a7f3d52a3dc6d71d59016418a6 /fs/fuse
parent27f1b36326bc8b6911e7052bc4b80a10234f0ec5 (diff)
downloadlinux-stable-f2b3455e47c72bef80fe584adb9bb9bc5afdd99c.tar.gz
linux-stable-f2b3455e47c72bef80fe584adb9bb9bc5afdd99c.tar.bz2
linux-stable-f2b3455e47c72bef80fe584adb9bb9bc5afdd99c.zip
fuse: replace count*size kzalloc by kcalloc
kcalloc manages count*sizeof overflow. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 35b6f31ecc38..1570dad1915d 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1992,8 +1992,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;