Hi,

On Wed, Feb 26, 2003 at 03:12:03PM -0800, Greg KH wrote:
> On Wed, Feb 26, 2003 at 10:37:30PM +0100, Henning Meier-Geinitz wrote:
> > Unable to handle kernel NULL pointer dereference at virtual address 00000000
> >  printing eip:
> > c01e1dd7
> > *pde = 00000000
> > Oops: 0000
> > CPU:    0
> > EIP:    0060:[<c01e1dd7>]    Not tainted
> > EFLAGS: 00010082
> > EIP is at dl_reverse_done_list+0x163/0x194
> > eax: 00000000   ebx: dfd72080   ecx: dfd7b0c0   edx: 00000014
> > esi: dfd7b0e0   edi: df73f2bc   ebp: c02b1efc   esp: c02b1eb8
> > ds: 007b   es: 007b   ss: 0068
> > Process swapper (pid: 0, threadinfo=c02b0000 task=c027bde0)
> > Stack: dfbbb15e df73f2bc c1524eec dfbbb004 00000003 c0262c60 00000005 ffffff92 
> >        e0800010 dfe0e000 00000002 00000014 00000000 00000000 00000000 00000005 
> >        00000246 c02b1f2c c01e2c10 dfe0e000 c02b1f90 e0800014 c026324c 0000023a 
> > Call Trace:
> >  [<c01e2c10>] ohci_irq+0x130/0x1d8
> 
> David, any clues?

The crash doesn't happen if I move back the irq unlink from
destroy_scanner to disconnect_scanner:

--- ../linux-2.5.63-latest/drivers/usb/image/scanner.c  2003-02-26 11:42:56.000000000 
+0100
+++ drivers/usb/image/scanner.c 2003-02-27 10:16:11.000000000 +0100
@@ -827,10 +827,6 @@
        down (&scn_mutex);
        down (&(scn->sem));
 
-       if(scn->intr_ep) {
-               dbg("%s(%d): Unlinking IRQ URB", __FUNCTION__, scn->scn_minor);
-               usb_unlink_urb(scn->scn_irq);
-       }
        usb_driver_release_interface(&scanner_driver,
                &scn->scn_dev->actconfig->interface[scn->ifnum]);
 
@@ -1130,6 +1126,11 @@
        intf->kdev = NODEV;
 
        usb_set_intfdata(intf, NULL);
+       if(scn->intr_ep) {
+               dbg("%s(%d): Unlinking IRQ URB", __FUNCTION__, scn->scn_minor);
+               usb_unlink_urb(scn->scn_irq);
+       }
+
        if (scn)
                kobject_put(&scn->kobj);
 }

Now even writing to an open but disconncted device doesn't crash
anymore. So I'd say the patch works with this change.

> And does this also happen on uhci?

Sorry, I can't test uhci.

But you don't need a scanner to test the scanner driver. Any device
that is of class "vendor specific" and provides at leas one bulk-in
endpoint should be detected by the scanner driver (modprobe scanner
vendor=0x1234 product=0x1234). For testing open + disconnect that
should work.

Bye,
  Henning


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to