Re: Oops w/ USB serial + modular ipaq

From: Zwane Mwaikambo
Date: Wed Jun 23 2004 - 03:21:20 EST


On Wed, 23 Jun 2004, Zwane Mwaikambo wrote:

> Loading the ipaq module, connecting a device and then unloading ipaq.ko
> oopses.
>
> It's not safe to use serial->interface after that
> usb_driver_release_interface(). The following patch works as a workaround
> but i don't trust it as there may be a leak.
>
> Index: linux-2.6.7/drivers/usb/serial/usb-serial.c
> ===================================================================
> RCS file: /home/cvsroot/linux-2.6.7/drivers/usb/serial/usb-serial.c,v
> retrieving revision 1.1.1.1
> diff -u -p -B -r1.1.1.1 usb-serial.c
> --- linux-2.6.7/drivers/usb/serial/usb-serial.c 16 Jun 2004 16:49:38 -0000 1.1.1.1
> +++ linux-2.6.7/drivers/usb/serial/usb-serial.c 23 Jun 2004 06:29:56 -0000
> @@ -1393,7 +1393,6 @@ void usb_serial_deregister(struct usb_se
> serial = serial_table[i];
> if ((serial != NULL) && (serial->type == device)) {
> usb_driver_release_interface (&usb_serial_driver, serial->interface);
> - usb_serial_disconnect (serial->interface);
> }
> }
>

I'll leave this patch going in a load/unload loop overnight and check on
slab.

Thanks,
Zwane

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/