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]
Message-ID: <20110910182831.GA30865@suse.de>
Date:	Sat, 10 Sep 2011 20:28:31 +0200
From:	Greg KH <gregkh@...e.de>
To:	KY Srinivasan <kys@...rosoft.com>
Cc:	Greg KH <greg@...ah.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
	"virtualization@...ts.osdl.org" <virtualization@...ts.osdl.org>,
	Haiyang Zhang <haiyangz@...rosoft.com>
Subject: Re: [PATCH 18/25] Staging: hv: storvsc: Eliminate the usage of ext
 field in struct  hv_device

On Sat, Sep 10, 2011 at 02:16:14PM +0000, KY Srinivasan wrote:
> 
> 
> > -----Original Message-----
> > From: Greg KH [mailto:greg@...ah.com]
> > Sent: Friday, September 09, 2011 4:45 PM
> > To: KY Srinivasan
> > Cc: gregkh@...e.de; linux-kernel@...r.kernel.org;
> > devel@...uxdriverproject.org; virtualization@...ts.osdl.org; Haiyang Zhang
> > Subject: Re: [PATCH 18/25] Staging: hv: storvsc: Eliminate the usage of ext field in
> > struct hv_device
> > 
> > On Thu, Sep 08, 2011 at 07:24:29AM -0700, K. Y. Srinivasan wrote:
> > > Now, eliminate the usage of ext field in struct  hv_device for storvsc driver.
> > > We do this by registering pointer to struct storvsc_device as the driver
> > > specific data and eliminating the current usage of driver specific data to
> > > save and retrieve the pointer to struct Scsi_Host.
> > > Additionally, all access to the driver specific data is through
> > > the vmbus wrapper functions.
> > >
> > > Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
> > > Signed-off-by: Haiyang Zhang <haiyangz@...rosoft.com>
> > > ---
> > >  drivers/staging/hv/storvsc_drv.c |   24 +++++++++++++++---------
> > >  1 files changed, 15 insertions(+), 9 deletions(-)
> > >
> > > diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
> > > index 57c1035..98d47cd 100644
> > > --- a/drivers/staging/hv/storvsc_drv.c
> > > +++ b/drivers/staging/hv/storvsc_drv.c
> > > @@ -266,6 +266,7 @@ struct storvsc_device {
> > >  	bool	 destroy;
> > >  	bool	 drain_notify;
> > >  	atomic_t num_outstanding_req;
> > > +	struct Scsi_Host *host;
> > 
> > You are properly reference counting this pointer, right?
> 
> The scsi_host_alloc() which we use to allocate the host structure, gives us
> the needed reference.

Ok, thanks, I missed that.  The casting though should be taken out,
otherwise the janitor project will just come along and clean it up
again...

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