From: Rick Lindsley <ricklind@us.ibm.com>
To: Alexander Viro <viro@math.psu.edu>
Cc: "David C. Hansen" <dave@sr71.net>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remove BKL from drivers' release functions
Date: Fri, 30 Nov 2001 16:47:10 -0800 [thread overview]
Message-ID: <200112010047.fB10lA406654@eng4.beaverton.ibm.com> (raw)
In-Reply-To: Your message of "Fri, 30 Nov 2001 18:12:55 EST." <Pine.GSO.4.21.0111301747160.7125-100000@binet.math.psu.edu>
> back to Alexander Viro:
> > In other words, patch is completely bogus.
> No, not completely. In a lot of cases we just replaced some regular
> arithmetic with atomic instructions of some sort. These changes are
> still completely valid. But, in the cases where we added locking, we
Valid, but not necessary a good idea. Notice that there are very
real races in ->release() and ->open() instances. Removing BKL
from these (or replacing it with atomic operations) doesn't fix the
existing race. Moreover, it creates a false impression that thing
had been reviewed and fixed.
Well, but for the revelation that the BKL is held in chrdev_open(),
offering implicit serialization for all open routines, these *were*
reviewed and thought fixed. Atomic operations *do* fill the bill when
we are looking at counts used to guarantee exclusive opens. They
generally *don't* fill the bill when you want to take virtually any
other action based on those counts.
Sorry for "told you so", but that's what I'd been trying to explain
from the very beginning - back when the idea of that patch had been
discussed the first time. That work really has to be done
driver-by-driver...
It actually *was* in this case. This may look like an afternoon of
editor exercise, but each of the cases was inspected and reviewed
before recommending the patch, and collectively represents several
weeks' worth of work. In early November I posted a note to
linux-kernel which said, in part:
Before we post these patches, I thought I'd ask if in the time
since Al Viro moved this out here (July 2000) if anybody
(especially him!) has found a *legitimate* use of the BKL in the
release() functions. (We have not found one.)
There was no response.
Given the miss on chrdev_open(), we've got some patch patches to come
up with. However, this isn't a dump-and-run job. We accept the
responsibility for those patches, and we'll patch 'em up. While we
can't then miraculously announce it's safe to remove lock_kernel around
opens, we CAN announce we are closer, and nothing else will be any more
broken than it was before we started. As I said in an earlier post (and
I don't think anybody disagrees): this is an incremental task. Any
assistance you can provide in reviewing this work, including all to
date, is welcome.
Rick
next prev parent reply other threads:[~2001-12-01 0:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-28 23:05 David C. Hansen
2001-11-28 23:29 ` Andrew Morton
2001-11-28 23:42 ` David C. Hansen
2001-11-28 23:50 ` Robert Love
2001-11-28 23:36 ` Alan Cox
2001-11-28 23:32 ` David C. Hansen
2001-11-28 23:45 ` Russell King
2001-11-29 0:26 ` David C. Hansen
2001-11-29 0:37 ` Jeff Garzik
2001-11-29 0:41 ` Russell King
2001-11-29 1:33 ` David C. Hansen
2001-11-29 1:42 ` Jeff Garzik
2001-11-29 7:17 ` Oliver Neukum
2001-11-29 1:47 ` Alan Cox
2001-11-29 9:15 ` Russell King
2001-11-29 13:55 ` BALBIR SINGH
2001-11-30 19:30 ` Rick Lindsley
2001-11-30 9:57 ` Alexander Viro
2001-11-30 12:41 ` Victor Yodaiken
2001-11-30 20:02 ` Rick Lindsley
2001-11-30 19:38 ` David C. Hansen
2001-11-30 23:12 ` Alexander Viro
2001-12-01 0:47 ` Rick Lindsley [this message]
2001-12-01 9:52 ` Alan Cox
2001-12-01 10:06 ` Rick Lindsley
2001-11-30 20:11 ` Rick Lindsley
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=200112010047.fB10lA406654@eng4.beaverton.ibm.com \
--to=ricklind@us.ibm.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=dave@sr71.net \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@math.psu.edu \
/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®