Re: [PATCH 3/3] tty_lock: Localise the lock
From: Alan Cox
Date: Mon May 07 2012 - 12:39:48 EST
On Mon, 07 May 2012 18:30:08 +0200
Sasha Levin <levinsasha928@xxxxxxxxx> wrote:
> On Mon, 2012-05-07 at 17:11 +0100, Alan Cox wrote:
> > > 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/