2.4.22, USB visor module crashing on HotSync.
Subsystems (2)
Quoted 12 lines · Ingo Oeser
Hi Greg,
there seems to be a problem with the visor module and
usb_serial.Please look at
__serial_close()andusb_disconnect()calling it in line 1406 vs. line 1408. I would suggest removing 1408 or folding it into__serial_close().Formal Bug-Reporting follows:
[1.] One line summary of the problem:
Quoted 7 lines
USB visor module and
usb_serialcrashing on HotSync inusb_disconnect[2.] Full description of the problem/report:
usb_disconnectcalls__serial_close()which sets the tty = NULL and afterwards trys to settty->private_data= NULL which will crash
Nice, someone else reported this yesterday for the ftdi_sio driver.
Can you test the patch below and let me know if this fixes it?
thanks,
greg k-h
drivers/usb/serial/usbserial.c +6 -6
@@ -556,7 +556,10 @@else generic_close (port, filp); port->open_count =0 ; - port->tty =NULL ; +if (port->tty) { + port->tty->driver_data =NULL ; + port->tty =NULL ; + } }if (port->serial->type->owner)
@@ -1401,12 +1404,9 @@for (i =0 ; i < serial->num_ports; ++i) { port = &serial->port[i];down (&port->sem); -if (port->tty !=NULL ) { -while (port->open_count >0 ) { +if (port->tty !=NULL ) +while (port->open_count >0 )__serial_close (port,NULL ); - } - port->tty->driver_data =NULL ; - }up (&port->sem); }