tty: Fix a USB serial crash/scribble
authorAlan Cox <alan@linux.intel.com>
Mon, 27 Jul 2009 09:58:08 +0000 (10:58 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 27 Jul 2009 19:23:22 +0000 (12:23 -0700)
The port lock is used to protect the port state. However the port structure
is freed on a hangup, then the lock taken on a close. The right fix is to
drop the port on tty->shutdown() but we can't yet do that due to sleep v
non-sleeping rules. Instead do the next best thing and fix it up when we are
not in -rc season.

Reported-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Tested-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

No differences found