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: <0F5B06BAB751E047AB5C87D1F77A77886995B7E02A@GVW0547EXC.americas.hpqcorp.net>
Date:	Mon, 4 Jan 2010 16:14:53 +0000
From:	"Miller, Mike (OS Dev)" <Mike.Miller@...com>
To:	Julia Lawall <julia@...u.dk>,
	ISS StorageDev <iss_storagedev@...com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: RE: [PATCH 1/2] drivers/block: drop unnecesary memset

 

> -----Original Message-----
> From: Julia Lawall [mailto:julia@...u.dk] 
> Sent: Saturday, December 19, 2009 1:30 AM
> To: Miller, Mike (OS Dev); ISS StorageDev; 
> linux-kernel@...r.kernel.org; kernel-janitors@...r.kernel.org
> Subject: [PATCH 1/2] drivers/block: drop unnecesary memset
> 
> From: Julia Lawall <julia@...u.dk>
> 
> memset of 0 is not needed after kzalloc
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression x;
> statement S;
> @@
> 
> x = kzalloc(...);
> if (x == NULL) S
> ... when != x
> -memset(x,0,...);// </smpl>
> 
> Signed-off-by: Julia Lawall <julia@...u.dk>

Acked-by: Mike Miller <mike.miller@...com>

> 
> ---
>  drivers/block/cciss.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff -u -p a/drivers/block/cciss.c b/drivers/block/cciss.c
> --- a/drivers/block/cciss.c
> +++ b/drivers/block/cciss.c
> @@ -4379,7 +4379,6 @@ static void cciss_shutdown(struct pci_de
>  		return;
>  	}
>  	/* write all data in the battery backed cache to disk */
> -	memset(flush_buf, 0, 4);
>  	return_code = sendcmd_withirq(CCISS_CACHE_FLUSH, 
> h->ctlr, flush_buf,
>  		4, 0, CTLR_LUNID, TYPE_CMD);
>  	kfree(flush_buf);
> --
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ