[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090807192333.GA4979@nowhere>
Date: Fri, 7 Aug 2009 21:23:35 +0200
From: Frederic Weisbecker <fweisbec@...il.com>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
Cc: Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
Christoph Hellwig <hch@....de>,
Andi Kleen <andi@...stfloor.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Greg Kroah-Hartman <gregkh@...e.de>
Subject: Re: [PATCH 3/5] tty: handle VT specific compat ioctls in vt driver
On Fri, Aug 07, 2009 at 10:57:32AM +0100, Alan Cox wrote:
> On Fri, 7 Aug 2009 08:23:58 +0200
> Frederic Weisbecker <fweisbec@...il.com> wrote:
>
> > Hi,
> >
> >
> > On Thu, Aug 06, 2009 at 03:09:28PM +0200, Arnd Bergmann wrote:
> > > The VT specific compat_ioctl handlers are the only ones
> > > in common code that require the BKL. Moving them into
> > > the vt driver lets us remove the BKL from the other handlers
> > > and cleans up the code.
> >
> >
> > Why does it require the bkl?
>
> It's always taken the BKL - you have to prove it doesn't need it. Which
> btw isn't true - it does need it in various places still.
>
> Alan
It was a way to tell "I would like to know what it is protecting" ;-)
I can imagine it is not here for no reason, the problem is to find why.
As an example, to find the reason of the following lines in do_tty_hangup():
/* inuse_filps is protected by the single kernel lock */
lock_kernel();
I had to look at a 2.2 kernel. At this time, inuse_filps existed,
and now it is replaced by the tty->tty_files field, which
is protected by file_list_lock().
So according to the comment, we can remove the bkl there, but what
guarantees its role hasn't evolved since then to make it protecting
something else...
--
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