lists.openwall.net   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  linux-cve-announce  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]
Message-ID: <1281595694.4440.2.camel@powerslave>
Date:	Thu, 12 Aug 2010 09:48:14 +0300
From:	Luciano Coelho <luciano.coelho@...ia.com>
To:	ext Joe Perches <joe@...ches.com>
Cc:	netdev <netdev@...r.kernel.org>,
	linux-wireless <linux-wireless@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH (for some future time)] drivers/net: Convert unbounded
 kzalloc calls to kcalloc

On Wed, 2010-08-11 at 19:02 +0200, ext Joe Perches wrote:
> These changes may be slightly safer in some instances.
> 
> There are other kzalloc calls with a multiply, but those
> calls are typically "small fixed #" * sizeof(some pointer)"
> and those are not converted.
> 
> Signed-off-by: Joe Perches <joe@...ches.com>
> ---

[...]

>  drivers/net/wireless/wl12xx/wl1271_scan.c |    2 +-

[...]

> diff --git a/drivers/net/wireless/wl12xx/wl1271_scan.c b/drivers/net/wireless/wl12xx/wl1271_scan.c
> index fec43ee..30dc100 100644
> --- a/drivers/net/wireless/wl12xx/wl1271_scan.c
> +++ b/drivers/net/wireless/wl12xx/wl1271_scan.c
> @@ -248,7 +248,7 @@ int wl1271_scan(struct wl1271 *wl, const u8 *ssid, size_t ssid_len,
> 
>         wl->scan.req = req;
> 
> -       wl->scan.scanned_ch = kzalloc(req->n_channels *
> +       wl->scan.scanned_ch = kcalloc(req->n_channels,
>                                       sizeof(*wl->scan.scanned_ch),
>                                       GFP_KERNEL);
>         wl1271_scan_stm(wl);

For the wl1271 part:

Acked-by: Luciano Coelho <luciano.coelho@...ia.com>

-- 
Cheers,
Luca.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ