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: <20150528065325.GA31089@sudip-PC>
Date:	Thu, 28 May 2015 12:23:25 +0530
From:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
To:	Felipe Balbi <balbi@...com>
Cc:	Greg KH <gregkh@...uxfoundation.org>,
	Alan Stern <stern@...land.harvard.edu>,
	Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
	Tal Shorer <tal.shorer@...il.com>,
	Sasha Levin <sasha.levin@...cle.com>,
	USB list <linux-usb@...r.kernel.org>,
	"<linux-kernel@...r.kernel.org>" <linux-kernel@...r.kernel.org>,
	David Cohen <david.a.cohen@...ux.intel.com>,
	Lu Baolu <baolu.lu@...ux.intel.com>
Subject: Re: [PATCH] usb: ulpi: don't register drivers if bus doesn't exist

On Thu, May 28, 2015 at 12:12:56PM +0530, Sudip Mukherjee wrote:
> On Thu, May 28, 2015 at 12:54:59AM -0500, Felipe Balbi wrote:
> > On Thu, May 28, 2015 at 11:09:38AM +0530, Sudip Mukherjee wrote:
> > > On Wed, May 27, 2015 at 08:21:16AM -0700, Greg KH wrote:
> > > > On Wed, May 27, 2015 at 11:16:34AM -0400, Alan Stern wrote:
> > > > > On Wed, 27 May 2015, Heikki Krogerus wrote:
> > > > 
> > > > Maybe we need to test for this in the driver core, not allowing drivers
> > > > for busses that are not registered, that might solve the main problem
> > > > here.  I'll try to look at it tonight.
> > > may i suggest something like this ?
> > > buildtest with allmodconfig and allyesconfig on x86_64.
> > > built and booted on x86.
> > > 
> > > 
> > > diff --git a/drivers/base/bus.c b/drivers/base/bus.c
> > > index 5005924..95cefa0 100644
> > > --- a/drivers/base/bus.c
> > > +++ b/drivers/base/bus.c
> > > @@ -943,6 +943,7 @@ int bus_register(struct bus_type *bus)
> > >  	if (retval)
> > >  		goto bus_groups_fail;
> > >  
> > > +	bus->registered = true;
> > 
> > once set, it's never cleared.
> It should be cleared when we go for bus_unregister.
apart from bus_register we need the check in some other places also.
like bus_create_file().

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