mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
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>
This commit is contained in:
parent
27f1b36326
commit
f2b3455e47
@ -1992,8 +1992,8 @@ static int fuse_writepages(struct address_space *mapping,
|
|||||||
data.ff = NULL;
|
data.ff = NULL;
|
||||||
|
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
data.orig_pages = kzalloc(sizeof(struct page *) *
|
data.orig_pages = kcalloc(FUSE_MAX_PAGES_PER_REQ,
|
||||||
FUSE_MAX_PAGES_PER_REQ,
|
sizeof(struct page *),
|
||||||
GFP_NOFS);
|
GFP_NOFS);
|
||||||
if (!data.orig_pages)
|
if (!data.orig_pages)
|
||||||
goto out;
|
goto out;
|
||||||
|
Loading…
Reference in New Issue
Block a user