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]
Date:	Fri, 9 Sep 2011 13:40:13 -0700
From:	Greg KH <greg@...ah.com>
To:	"K. Y. Srinivasan" <kys@...rosoft.com>
Cc:	gregkh@...e.de, linux-kernel@...r.kernel.org,
	devel@...uxdriverproject.org, virtualization@...ts.osdl.org,
	Haiyang Zhang <haiyangz@...rosoft.com>
Subject: Re: [PATCH 07/25] Staging: hv: vmbus: Change the signature of struct
 hv_driver remove() function

On Thu, Sep 08, 2011 at 07:24:18AM -0700, K. Y. Srinivasan wrote:
> In preparation for leveraging the driver_data in  struct
> hv_vmbus_device_id, change the signature of struct hv_driver remove() function.

Why?  This shouldn't be needed at remove() time as the driver already
has saved off the needed id information in its probe function, if it
needed it.
> --- a/drivers/staging/hv/vmbus_drv.c
> +++ b/drivers/staging/hv/vmbus_drv.c
> @@ -329,12 +329,19 @@ static int vmbus_remove(struct device *child_device)
>  	struct hv_driver *drv;
>  
>  	struct hv_device *dev = device_to_hv_device(child_device);
> +	const struct hv_vmbus_device_id *dev_id;
>  
>  	if (child_device->driver) {
>  		drv = drv_to_hv_drv(child_device->driver);
> +		dev_id = drv->id_table;
> +
> +		for (; !is_null_guid(dev_id->guid); dev_id++)
> +			if (!memcmp(&dev_id->guid, &dev->dev_type.b,
> +					sizeof(uuid_le)))
> +				break;

Even though it is wrong, look you duplicated the matching logic again!

ick.

greg k-h
--
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