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: <20110830075218.GA3056@becoht-mvanga>
Date:	Tue, 30 Aug 2011 09:52:18 +0200
From:	Manohar Vanga <manohar.vanga@...n.ch>
To:	"Emilio G. Cota" <cota@...ap.org>
CC:	Greg KH <greg@...ah.com>, <gregkh@...e.de>, <martyn.welch@...com>,
	<devel@...verdev.osuosl.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] staging: vme: add struct vme_dev for VME devices

Hey Emilio,

On Mon, Aug 29, 2011 at 07:55:08PM -0400, Emilio G. Cota wrote:
> On Mon, Aug 29, 2011 at 10:52:41 -0700, Greg KH wrote:
> > On Mon, Aug 29, 2011 at 11:02:49AM +0200, Manohar Vanga wrote:
> > > --- a/drivers/staging/vme/vme_bridge.h
> > > +++ b/drivers/staging/vme/vme_bridge.h
> > > @@ -115,9 +115,8 @@ struct vme_bridge {
> > >  	struct list_head bus_list; /* list of VME buses */
> > >  	struct module *owner;	/* module that owns the bridge */
> > >  
> > > -	struct device dev[VME_SLOTS_MAX];	/* Device registered with
> > > -						 * device model on VME bus
> > > -						 */
> > > +	struct vme_dev dev[VME_SLOTS_MAX];	/* Device registered
> > > +						 * on VME bus */
> > 
> > Overall, this is the right way to go, using a vme_dev.
> > 
> > BUT, you should never have a static list of devices, these should be
> > pointers, not actual structures here, otherwise your reference counting
> > just got all messed up and is wrong.
> > 
> > And yes, I know you didn't create the code this way, but it needs to be
> > fixed _before_ you make this kind of a change.
> 
> True, I overlooked this while reviewing >_<
> 
> Manohar, have a look at vme_unregister_driver_ng() and
> __vme_register_driver_bus() in this patch:
>  
>     http://article.gmane.org/gmane.linux.kernel/1054046

I actually threw the static devices out of the code in patch 3. I didn't
introduce it here as I thought the changes were unrelated (introducing
struct vme_dev across the code and getting rid of that static device
array).

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