ChangeSet 1.1315.8.18, 2003/09/17 16:54:30-07:00, greg@kroah.com [PATCH] USB: make sure we never reference a usbserial port after it has been unregistered. drivers/usb/serial/usb-serial.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c --- a/drivers/usb/serial/usb-serial.c Fri Sep 19 17:11:30 2003 +++ b/drivers/usb/serial/usb-serial.c Fri Sep 19 17:11:30 2003 @@ -871,8 +871,10 @@ /* the ports are cleaned up and released in port_release() */ for (i = 0; i < serial->num_ports; ++i) - if (serial->port[i]->dev.parent != NULL) + if (serial->port[i]->dev.parent != NULL) { device_unregister(&serial->port[i]->dev); + serial->port[i] = NULL; + } /* If this is a "fake" port, we have to clean it up here, as it will * not get cleaned up in port_release() as it was never registered with