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:	Wed, 23 Feb 2011 22:48:27 +0000
From:	Haiyang Zhang <haiyangz@...rosoft.com>
To:	Greg KH <greg@...ah.com>
CC:	Hank Janssen <hjanssen@...rosoft.com>,
	KY Srinivasan <kys@...rosoft.com>,
	"Abhishek Kane (Mindtree Consulting PVT LTD)" 
	<v-abkane@...rosoft.com>, "gregkh@...e.de" <gregkh@...e.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
	"virtualization@...ts.osdl.org" <virtualization@...ts.osdl.org>
Subject: RE: [PATCH 1/4] staging: hv: Fix the code depending on struct
 vmbus_driver_context data order

> From: Greg KH [mailto:greg@...ah.com]
> Sent: Wednesday, February 23, 2011 4:27 PM
> >  struct driver_context {
> >  	struct hv_guid class_id;
> > -
> >  	struct device_driver driver;
> > +	struct hv_driver *hv_drv;
> 
> If you have a pointer to hv_driver, why do you need a full 'struct
> device_driver' here?  That sounds really wrong.
> 
> Actually, having 'struct device_driver' within a structure called
> "driver_context" seems wrong, this should be what 'struct hv_driver'
> really is, right?

The hv_driver contains Hyper-V specific data, like hv_guid. But the
struct driver_context contains data and functions related to Linux
kernel side, such as the struct device_driver defined by kernel. So,
they are kept separately.

(just saw Ky's email, which further explained the layering.)

Thanks,

- Haiyang

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