Messages in this thread | | | Date | Sat, 4 Oct 2003 02:15:35 +0400 | From | Andrew Zabolotny <> | Subject | A bug (and a fix) in usbserial.c, kernel 2.4.22 |
| |
Hello!
I was using the usbserial driver to connect to my PDA and was quite surprised when I have seen kernel oops messages in /var/log/messages after I disconnect my PDA.
A examination of /proc/kcore shown that the bug happens in line 1408 of usbserial.c, here is a extract:
if (port->tty != NULL) { while (port->open_count > 0) { __serial_close(port, NULL); } port->tty->driver_data = NULL; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the line that oopses. }
The __serial_close function is setting port->tty to NULL, so the solution is to remove either the line 559:
... port->open_count = 0; port->tty = NULL; ...
or line 1408 (which seems a better solution to me).
-- Greetings, Andrew - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |