lkml.org 
[lkml]   [2003]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectA 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/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.299 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site