]> git.baikalelectronics.ru Git - kernel.git/commit
tty_open can return to userspace holding tty_mutex
authorEric Paris <eparis@redhat.com>
Tue, 27 Jan 2009 11:50:37 +0000 (11:50 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 27 Jan 2009 15:37:15 +0000 (07:37 -0800)
commit69dd136e604a57b2c34ef02d8046ccc9694c1373
tree9d6d6de93da50d6c2df3cc7b0052a189f410a076
parenta2c2392ba92c573d8e90656352eceb6e9cfaa472
tty_open can return to userspace holding tty_mutex

__tty_open could return (to userspace) holding the tty_mutex thanks to a
regression introduced by 7a84b46e97b7cf13c97c9db325e6eab1b5dbe645 ("Move
tty lookup/reopen to caller").

This was found by bisecting an fsfuzzer problem.  Admittedly I have no
idea how it managed to tickle this 100% reliably, but it is clearly a
regression and when hit leaves the box in a completely unusable state.
This patch lets the fsfuzzer test complete every time.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/tty_io.c