From: Duncan Sands <baldrick@free.fr>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Nuno Ferreira <nuno.ferreira@graycell.biz>,
<linux-kernel@vger.kernel.org>, <linux-usb-devel@lists.sf.net>
Subject: Re: 2.6.6 Oops disconnecting speedtouch usb modem
Date: Thu, 13 May 2004 18:45:29 +0200 [thread overview]
Message-ID: <200405131845.29812.baldrick@free.fr> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0405131132310.1543-100000@ida.rowland.org>
> I don't see how that can be. The stack dump is getting unwieldy so I
> haven't duplicated it here, but if I'm reading it right the problem occurs
> when usb_set_interface() is called by usb_unbind_interface(), which itself
> is called indirectly by device_unregister() above. The pointer for the
> interface being unregistered has not yet been set to NULL, hence this
> shouldn't cause an oops.
No, but the pointer for another (previous) interface may just have been
set to NULL, causing an Oops when usb_ifnum_to_if loops over all
interfaces. In other words, maybe
for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
struct usb_interface *interface;
/* remove this interface */
interface = dev->actconfig->interface[i];
dev_dbg (&dev->dev, "unregistering interface %s\n",
interface->dev.bus_id);
device_unregister (&interface->dev);
dev->actconfig->interface[i] = NULL;
}
should be turned into
for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
struct usb_interface *interface;
/* remove this interface */
interface = dev->actconfig->interface[i];
dev_dbg (&dev->dev, "unregistering interface %s\n",
interface->dev.bus_id);
device_unregister (&interface->dev);
}
for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++)
dev->actconfig->interface[i] = NULL;
All the best,
Duncan.
next prev parent reply other threads:[~2004-05-13 16:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-11 11:26 2.6.6 Oops disconnecting speedtouch usb modem Nuno Ferreira
2004-05-11 11:40 ` Duncan Sands
2004-05-11 14:56 ` Nuno Ferreira
2004-05-12 2:25 ` Nuno Ferreira
2004-05-12 15:02 ` Duncan Sands
2004-05-13 9:04 ` Duncan Sands
2004-05-13 15:56 ` Alan Stern
2004-05-13 16:45 ` Duncan Sands [this message]
2004-05-13 17:56 ` PATCH: (as279) Don't delete interfaces until all are unbound Alan Stern
2004-05-13 19:50 ` Duncan Sands
2004-05-13 21:03 ` Alan Stern
2004-05-13 21:23 ` Duncan Sands
2004-05-13 22:40 ` Greg KH
2004-05-14 10:24 ` Nuno Ferreira
2004-05-15 15:50 ` Nuno Ferreira
2004-05-15 16:43 ` Duncan Sands
2004-05-11 11:42 ` 2.6.6 Oops disconnecting speedtouch usb modem Grzegorz Kulewski
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=200405131845.29812.baldrick@free.fr \
--to=baldrick@free.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sf.net \
--cc=nuno.ferreira@graycell.biz \
--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