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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110926225159.GA13175@flamenco.cs.columbia.edu>
Date:	Mon, 26 Sep 2011 18:51:59 -0400
From:	"Emilio G. Cota" <cota@...ap.org>
To:	Manohar Vanga <manohar.vanga@...n.ch>
Cc:	gregkh@...e.de, martyn.welch@...com, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] staging: vme: add struct vme_dev for VME devices

On Mon, Sep 26, 2011 at 11:27:15 +0200, Manohar Vanga wrote:
(snip)
> diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c
> index 810fe1f..76e08f3 100644
> --- a/drivers/staging/vme/vme.c
> +++ b/drivers/staging/vme/vme.c
(snip)
> @@ -1358,26 +1355,29 @@ int vme_register_bridge(struct vme_bridge *bridge)
>  	 * specification.
>  	 */
>  	for (i = 0; i < VME_SLOTS_MAX; i++) {
> -		bridge->dev[i] = kzalloc(sizeof(struct device), GFP_KERNEL);
> +		bridge->dev[i] = kzalloc(sizeof(struct vme_dev), GFP_KERNEL);
>  		if (!bridge->dev[i]) {
>  			retval = -ENOMEM;
>  			goto err_devalloc;
>  		}
> -		dev = bridge->dev[i];
> -		memset(dev, 0, sizeof(struct device));
> -
> -		dev->parent = bridge->parent;
> -		dev->bus = &vme_bus_type;
> -		dev->release = vme_dev_release;
> +		vdev = bridge->dev[i];
> +		memset(vdev, 0, sizeof(struct vme_dev));

minor nit, in fact removed in patch 2: memset here is redundant
(see kzalloc above).

The rest looks good.

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