From: Arnd Bergmann Date: Tue, 1 Jun 2010 20:53:06 +0000 (+0200) Subject: tty: reorder ldisc locking X-Git-Tag: v2.6.36-rc1~294^2~28 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60af22d2ed490554cc92c8d0fed0b5b9cf687568;p=pandora-kernel.git tty: reorder ldisc locking We need to release the BTM in paste_selection() when sleeping in tty_ldisc_ref_wait to avoid deadlocks with tty_ldisc_enable. In tty_set_ldisc, we now always grab the BTM before taking the ldisc_mutex in order to avoid AB-BA deadlocks between the two. tty_ldisc_halt potentially blocks on a workqueue function that takes the BTM, so we must release the BTM before calling it. Signed-off-by: Arnd Bergmann Cc: Alan Cox Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed