lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 16 Jun 2014 11:37:46 -0700
From:	Joe Perches <>
To:	Fabian Frederick <>
	Phillip Lougher <>,
	Andrew Morton <>
Subject: Re: [PATCH 1/1] fs/squashfs/file_direct.c: replace count*size
 kmalloc by kcalloc

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 *), GFP_KERNEL);

kmalloc(a * sizeof(b), GFP) -> kmalloc_array(a, sizeof(b), GFP)
kzalloc(a * sizeof(b), GFP) -> kcalloc(a, sizeof(b), GFP)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists