public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <greg@kroah.com>, David Brownell <david-b@pacbell.net>,
	Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: Handling devices that don't have a bus
Date: Sat, 1 Apr 2006 18:12:12 +0100	[thread overview]
Message-ID: <20060401171212.GA31107@flint.arm.linux.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0604011128020.17557-100000@netrider.rowland.org>

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

  reply	other threads:[~2006-04-01 17:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-30 20:45 Handling devices that don't have a bus Alan Stern
2006-03-30 21:28 ` David Brownell
2006-03-30 22:26 ` Greg KH
2006-04-01  9:38   ` Russell King
2006-04-01  9:47 ` Russell King
2006-04-01 16:46   ` Alan Stern
2006-04-01 17:12     ` Russell King [this message]
2006-04-01 17:32     ` David Brownell
2006-04-01 20:14       ` Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060401171212.GA31107@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=david-b@pacbell.net \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox