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]
Date:	Sat, 06 Aug 2011 12:23:42 -0500
From:	James Bottomley <James.Bottomley@...senPartnership.com>
To:	Thomas Meyer <thomas@...3r.de>
Cc:	hare@...e.de, linux-kernel@...r.kernel.org,
	linux-scsi@...r.kernel.org
Subject: Re: [PATCH] [SCSI] aic7xxx: use kstrdup()

On Sat, 2011-08-06 at 11:22 +0200, Thomas Meyer wrote:
> From: Thomas Meyer <thomas@...3r.de>
> 
>  Use kstrdup rather than duplicating its implementation
> 
>  The semantic patch that makes this output is available
>  in scripts/coccinelle/api/kstrdup.cocci.
> 
>  More information about semantic patching is available at
>  http://coccinelle.lip6.fr/
> 
> Signed-off-by: Thomas Meyer <thomas@...3r.de>
> ---
> 
> diff -u -p a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
> --- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c 2010-09-13 07:01:17.520528007 +0200
> +++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c 2011-08-01 21:15:58.925094946 +0200
> @@ -178,10 +178,9 @@ ahd_linux_pci_dev_probe(struct pci_dev *
>  		ahd_get_pci_bus(pci),
>  		ahd_get_pci_slot(pci),
>  		ahd_get_pci_function(pci));
> -	name = kmalloc(strlen(buf) + 1, GFP_ATOMIC);
> +	name = kstrdup(buf, GFP_ATOMIC);
>         if (name == NULL)
>                 return (-ENOMEM);
> -       strcpy(name, buf);

All adaptec drivers are in deep maintenance mode because the hardware
isn't being produced any longer.  The only things we really apply to
them now is essential bug fixes, which this isn't.

James


--
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