[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120507174240.4209c5cb@pyramind.ukuu.org.uk>
Date: Mon, 7 May 2012 17:42:40 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Sasha Levin <levinsasha928@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: [PATCH 3/3] tty_lock: Localise the lock
On Mon, 07 May 2012 18:30:08 +0200
Sasha Levin <levinsasha928@...il.com> 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists