Re: Oops w/ USB serial + modular ipaq

Zwane Mwaikambo
2004-06-23T08:19:44Z

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