Skip to content
Commit d3ca8b64 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds
Browse files

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: default avatarAlan Cox <alan@linux.intel.com>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a01ee165
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment