From: Frederic Weisbecker <fweisbec@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Andi Kleen <andi@firstfloor.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: Re: [PATCH 3/5] tty: handle VT specific compat ioctls in vt driver
Date: Fri, 7 Aug 2009 21:23:35 +0200 [thread overview]
Message-ID: <20090807192333.GA4979@nowhere> (raw)
In-Reply-To: <20090807105732.1340a115@lxorguk.ukuu.org.uk>
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@gmail.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...
next prev parent reply other threads:[~2009-08-07 19:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 13:09 [PATCH 0/5] Kill the BKL in compat ioctl handling Arnd Bergmann
2009-08-06 13:09 ` [PATCH 1/5] arch/um: handle compat_ioctl in tty line driver Arnd Bergmann
2009-08-13 5:08 ` Amerigo Wang
2009-08-06 13:09 ` [PATCH 2/5] s390: move keyboard compat ioctls into tty3270 driver Arnd Bergmann
2009-08-06 13:09 ` [PATCH 3/5] tty: handle VT specific compat ioctls in vt driver Arnd Bergmann
2009-08-07 6:23 ` Frederic Weisbecker
2009-08-07 7:04 ` Arnd Bergmann
2009-08-07 8:04 ` Frederic Weisbecker
2009-08-07 12:02 ` Arnd Bergmann
2009-08-08 0:34 ` Frederic Weisbecker
2009-08-08 0:41 ` Greg KH
2009-08-08 1:03 ` Frederic Weisbecker
2009-08-08 3:20 ` Greg KH
2009-08-10 16:24 ` Arnd Bergmann
2009-08-07 9:57 ` Alan Cox
2009-08-07 19:23 ` Frederic Weisbecker [this message]
2009-08-06 13:09 ` [PATCH 4/5] compat_ioctl: remove VT specific ioctl handlers Arnd Bergmann
2009-08-06 13:09 ` [PATCH 5/5] compat_ioctl: do not hold BKL in handlers Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090807192333.GA4979@nowhere \
--to=fweisbec@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andi@firstfloor.org \
--cc=arnd@arndb.de \
--cc=gregkh@suse.de \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox