Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information