From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: David Brownell <david-b@pacbell.net>
Cc: linux-kernel@vger.kernel.org, spi-devel-general@lists.sourceforge.net
Subject: Re: [PATCH] spi: Push the BKL down into the drivers
Date: Fri, 23 May 2008 12:09:48 +0100 [thread overview]
Message-ID: <20080523120948.4b992d67@core> (raw)
In-Reply-To: <200805221740.51016.david-b@pacbell.net>
On Thu, 22 May 2008 17:40:50 -0700
David Brownell <david-b@pacbell.net> wrote:
> On Thursday 22 May 2008, Alan Cox wrote:
> > Another step to removing ->ioctl and to removing the BKL
>
> This happens to not apply with the latest patches; I'll
> address that.
>
> Where is the writeup about exactly what lock_kernel() is
> supposed to have been protecting against in ioctl code?
There isn't one. The big problem we have is that the ioctl methods were
implicitly called under the big kernel lock. Without pushing them down
into drivers we can't take the step of actually thinking at the driver
level "is this needed". Historically therefore we've never documented
*why* or *if* it was needed - it's just there. Pushing them into the
driver means the subsystem owner gets to see the implicit locking and can
actually ask the right questions with internal driver knowledge.
Whether it is needed is dependant on the internal locking model of the
driver - does it handle parallel ioctls correctly, are there races
against other functions in the driver (eg hot unplugs). That can't be
evaluated at a high level.
It's also made harder by the fact lots of drivers have buggy assumptions
about ioctl locking (watchdog was a fine example).
Alan
prev parent reply other threads:[~2008-05-23 11:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 21:45 [PATCH] spi: Push the BKL down into the drivers Alan Cox
2008-05-23 0:40 ` David Brownell
2008-05-23 11:09 ` Alan Cox [this message]
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=20080523120948.4b992d67@core \
--to=alan@lxorguk.ukuu.org.uk \
--cc=david-b@pacbell.net \
--cc=linux-kernel@vger.kernel.org \
--cc=spi-devel-general@lists.sourceforge.net \
/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