Thread (19 messages) 19 messages, 6 authors, 2012-05-11

Re: [PATCH 3/3] tty_lock: Localise the lock

From: Alan Cox <hidden>
Date: 2012-05-07 16:39:50
Also in: lkml

On Mon, 07 May 2012 18:30:08 +0200
Sasha Levin [off-list ref] wrote:
On Mon, 2012-05-07 at 17:11 +0100, Alan Cox wrote:
quoted
quoted
I don't believe that this change is correct.

Consider the following scenario:

tty_release -> tty_lock -> pty_close -> tty_vhangup -> tty_lock
We hang up tty->link not tty.

It's now a per tty lock. So I think we are ok.
Unless we can cause tty->link == tty, in which case:

We should not be able to cause tty->link == tty. So that's a different
problem altogether.

tty->link is set to point to the other half of the pty in pty_install and
in pty98_unix_install. It's never assigned to the same tty and ptys
simply wouldn't work if this wasn't the case.

So whatever your trace is showing, that's not the bug. Something more
complicated would appear to be afoot.

Alan

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help