Re: Handling devices that don't have a bus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 01, 2006 at 11:46:26AM -0500, Alan Stern wrote:
> On Sat, 1 Apr 2006, Russell King wrote:
> 
> > On Thu, Mar 30, 2006 at 03:45:50PM -0500, Alan Stern wrote:
> > > I recently tried running the dummy_hcd driver for the first time in a 
> > > while, and it crashed when the gadget driver was unloaded.  It turns out 
> > > this was because the gadget's embedded struct device is registered without 
> > > a bus, which triggers an oops when the device's driver is unbound.  The 
> > > oops could be fixed by doing this:
> > 
> > Can you provide the oops itself please?
> 
> No, I don't have it any more.  But I can tell you exactly where the oops 
> occurred.  In __device_release_driver() (in drivers/base/dd.c), this line 
> you added:
> 
> 		if (dev->bus->remove)
> 
> crashed because dev->bus was NULL.  My patch changes the line to:
> 
> 		if (dev->bus && dev->bus->remove)
> 
> Any objection to that?

Nope.

> I think you have misunderstood my point.

Yes I did.  Oops.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux