lkml.org 
[lkml]   [2009]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.31-rc5 regression: Oops when USB Serial disconnected while in use
Alan:

There's a problem with the tty->ops->shutdown method. It needs to
release the last port reference owned by the current tty. But when was
that reference originally acquired? Evidently during the first time
serial_open() was called for the current tty.

The problem is that serial_open() has no way to know if a particular
invocation is the first one for this tty! The ASYNCB_INITIALIZED flag
doesn't help, because it might not get set during the first call (i.e.,
if an error occurs).

To do this right, we need a flag in the tty_struct or the tty_port
which serial_open() can set when acquiring that first reference and
shutdown method can clear. Should I add such a flag?

Alan Stern



\
 
 \ /
  Last update: 2009-08-23 04:53    [W:0.353 / U:0.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site