From: David Brownell <[email protected]>
> Earlier, I reported an oops at shutdown. I just looked at
> what causes the oops and find that the call
> hcd->driver->stop()
> is executed while hcd->driver->stop is NULL.
>
> ...
> USB people may worry whether hcd->driver->stop should
> have been non-NULL.
Not supposed to be possible. All those hc_driver structures
are declared "static const", with non-null stop(). Looks like
something was zeroing some driver's readonly data segment while
it was still in use. (And who knows that else!)
Now wild pointers happen, and it took me some effort a few
weeks ago to catch one. But at first one should look at
simpler explanations.
Now that you tell me that these things are set at initialization
and never changed, the initialization must be wrong. And indeed,
it says "__devexit_p(uhci_stop)" and this yields NULL.
So, my previous stopoops patch can be replaced by
diff -r linux-2.5.23/linux/drivers/usb/host/uhci-hcd.c linux-2.5.23a/linux/drivers/usb/host/uhci-hcd.c
2431c2431
< static void __devexit uhci_stop(struct usb_hcd *hcd)
---
> static void uhci_stop(struct usb_hcd *hcd)
2512c2512
< stop: __devexit_p(uhci_stop),
---
> stop: uhci_stop,
(pasted from another window).
Andries
On Thu, Jun 20, 2002 at 08:49:36PM +0200, [email protected] wrote:
> Now that you tell me that these things are set at initialization
> and never changed, the initialization must be wrong. And indeed,
> it says "__devexit_p(uhci_stop)" and this yields NULL.
>
> So, my previous stopoops patch can be replaced by
<snip>
Yes, that's a correct patch. I've added it to my tree, thanks.
greg k-h