]> Git Repo - linux.git/commit
tty-ldisc: be more careful in 'put_ldisc' locking
authorLinus Torvalds <[email protected]>
Mon, 3 Aug 2009 21:54:56 +0000 (14:54 -0700)
committerGreg Kroah-Hartman <[email protected]>
Tue, 4 Aug 2009 20:46:30 +0000 (13:46 -0700)
commitcbe9352fa08f90aa03b4dbf1bbabfc95d196e562
tree960187b610e13e5ef7f461397bd0846a36221436
parent65b770468e98941e45e19780dff9283e663e6b8b
tty-ldisc: be more careful in 'put_ldisc' locking

Use 'atomic_dec_and_lock()' to make sure that we always hold the
tty_ldisc_lock when the ldisc count goes to zero. That way we can never
race against 'tty_ldisc_try()' increasing the count again.

Reported-by: OGAWA Hirofumi <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Tested-by: Sergey Senozhatsky <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/char/tty_ldisc.c
This page took 0.045051 seconds and 4 git commands to generate.