From: Jonathan Corbet <corbet@lwn.net>
To: Greg KH <gregkh@suse.de>
Cc: stoyboyker@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/13] [staging] changed ioctls to unlocked
Date: Tue, 24 Mar 2009 17:19:27 -0600 [thread overview]
Message-ID: <20090324171927.724da2f5@bike.lwn.net> (raw)
In-Reply-To: <20090324220136.GA12128@suse.de>
On Tue, 24 Mar 2009 15:01:36 -0700
Greg KH <gregkh@suse.de> wrote:
> Hm, why? What does this patch accomplish becides just pushing the
> lock_kernel into the driver? Shouldn't you fix the code to not need
> the lock_kernel at all instead?
Having done a lot of this myself, I can attest to what is going on
here. If you're trying to push the BKL out of the core, there's not
much choice except to shove it down into the drivers and such below
it. In very simple cases you can tell that the lock isn't needed.
But going messing around with the locking in random drivers is a sure
way to create nasty subtle problems.
So, if a specific driver's situation is not obvious, or if it's clear
that some sort of fix is required, it's generally best to just make the
lock_kernel() (which has always been there) explicit. Then people who
actually know the driver and have the hardware to test changes can
eliminate it at their leisure. Pushing the BKL down gets it out of the
core, keeps the semantics the same, and sticks a red flag on code which
needs examination by suitably clueful maintainers.
I've not looked in depth at this series of patches, but I understand
where it's coming from. Stoyan, if you want, I'd be happy to take
these through the BKL-removal tree once the maintainers are happy with
it. OTOH, it looks like the locked ioctl() isn't going anywhere
anytime soon, so it might be best to just send these individually
through the appropriate subsystem trees.
jon
next prev parent reply other threads:[~2009-03-24 23:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-24 21:12 stoyboyker
2009-03-24 22:01 ` Greg KH
2009-03-24 23:19 ` Jonathan Corbet [this message]
2009-03-24 23:40 ` Jonathan Corbet
2009-03-25 0:12 ` Stoyan Gaydarov
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=20090324171927.724da2f5@bike.lwn.net \
--to=corbet@lwn.net \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=stoyboyker@gmail.com \
/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
all inboxes | Powered by JetHome®