From: Linus Torvalds Date: Mon, 3 Aug 2009 21:54:56 +0000 (-0700) Subject: tty-ldisc: be more careful in 'put_ldisc' locking X-Git-Tag: v2.6.31-rc6~66^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbe9352fa08f90aa03b4dbf1bbabfc95d196e562;p=pandora-kernel.git 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 Signed-off-by: Linus Torvalds Tested-by: Sergey Senozhatsky Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed