Re: [PATCH 1/1] fs/squashfs/file_direct.c: replace count*size kmalloc by kcalloc

2014-06-16 Thread Joe Perches
On Mon, 2014-06-16 at 20:12 +0200, Fabian Frederick wrote: > kcalloc manages count*sizeof overflow. so does kmalloc_array > diff --git a/fs/squashfs/file_direct.c b/fs/squashfs/file_direct.c [] > - page = kmalloc(sizeof(void *) * pages, GFP_KERNEL); > + page = kcalloc(pages, sizeof(void

[PATCH 1/1] fs/squashfs/file_direct.c: replace count*size kmalloc by kcalloc

2014-06-16 Thread Fabian Frederick
kcalloc manages count*sizeof overflow. Cc: Phillip Lougher Cc: Andrew Morton Signed-off-by: Fabian Frederick --- fs/squashfs/file_direct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/squashfs/file_direct.c b/fs/squashfs/file_direct.c index 62a0de6..e9f9cf2 100644

[PATCH 1/1] fs/squashfs/file_direct.c: replace count*size kmalloc by kcalloc

2014-06-16 Thread Fabian Frederick
kcalloc manages count*sizeof overflow. Cc: Phillip Lougher phil...@squashfs.org.uk Cc: Andrew Morton a...@linux-foundation.org Signed-off-by: Fabian Frederick f...@skynet.be --- fs/squashfs/file_direct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH 1/1] fs/squashfs/file_direct.c: replace count*size kmalloc by kcalloc

2014-06-16 Thread Joe Perches
On Mon, 2014-06-16 at 20:12 +0200, Fabian Frederick wrote: kcalloc manages count*sizeof overflow. so does kmalloc_array diff --git a/fs/squashfs/file_direct.c b/fs/squashfs/file_direct.c [] - page = kmalloc(sizeof(void *) * pages, GFP_KERNEL); + page = kcalloc(pages, sizeof(void *),