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] [thread-next>] [day] [month] [year] [list]
Message-ID: <46B78672.9090808@linux.vnet.ibm.com>
Date:	Mon, 06 Aug 2007 15:37:06 -0500
From:	Brian King <brking@...ux.vnet.ibm.com>
To:	Mariusz Kozlowski <m.kozlowski@...land.pl>
CC:	santil@...ibm.com, jgarzik@...ox.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers/net/ibmveth.c: memset fix

Mariusz Kozlowski wrote:
> Hello,
> 
> 	Looks like memset() is zeroing wrong nr of bytes.

Good catch, however, I think we can just remove this memset altogether
since the memory gets allocated via kzalloc.

-Brian


> 
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@...land.pl>
> 
>  drivers/net/ibmveth.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- linux-2.6.23-rc1-mm2-a/drivers/net/ibmveth.c	2007-08-01 08:43:46.000000000 +0200
> +++ linux-2.6.23-rc1-mm2-b/drivers/net/ibmveth.c	2007-08-06 20:34:44.000000000 +0200
> @@ -963,7 +963,7 @@ static int __devinit ibmveth_probe(struc
>  {
>  	int rc, i;
>  	struct net_device *netdev;
> -	struct ibmveth_adapter *adapter = NULL;
> +	struct ibmveth_adapter *adapter;
> 
>  	unsigned char *mac_addr_p;
>  	unsigned int *mcastFilterSize_p;
> @@ -997,7 +997,7 @@ static int __devinit ibmveth_probe(struc
>  	SET_MODULE_OWNER(netdev);
> 
>  	adapter = netdev->priv;
> -	memset(adapter, 0, sizeof(adapter));
> +	memset(adapter, 0, sizeof(*adapter));
>  	dev->dev.driver_data = netdev;
> 
>  	adapter->vdev = dev;
> -
> 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


-- 
Brian King
Linux on Power Virtualization
IBM Linux Technology Center
-
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