From: Alan Cox Date: Tue, 29 May 2012 12:45:01 +0000 (+0100) Subject: pty: Fix lock inversion X-Git-Tag: v3.5-rc1~54 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3ca8b64b97ef4dc54d7bb0b88bbc01a1fca8cb9;p=pandora-kernel.git pty: Fix lock inversion The ptmx_open path takes the tty and devpts locks in the wrong order because tty_init_dev locks and returns a locked tty. As far as I can tell this is actually safe anyway because the tty being returned is new so nobody can get a reference to lock it at this point. However we don't even need the devpts lock at this point, it's only held as a byproduct of the way the locks were pushe down. Signed-off-by: Alan Cox Acked-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed