From: Linus Torvalds <torvalds@linux-foundation.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Mark Lord <lkml@rtr.ca>, Greg KH <gregkh@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
linux-usb-devel@lists.sourceforge.net,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [linux-usb-devel] [PATCH] base/class.c: prevent ooops due to insert/remove race (v3)
Date: Thu, 29 Nov 2007 15:09:36 -0800 (PST) [thread overview]
Message-ID: <alpine.LFD.0.9999.0711291505440.8458@woody.linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0711291700260.5666-100000@iolanthe.rowland.org>
On Thu, 29 Nov 2007, Alan Stern wrote:
>
> Yes indeed. I wish I could point you to the exact patch containing the
> fix, but the git software seems to have lost track of it (it's combined
> in with a large number of other patches with no obvious way to separate
> it out). It's also available in the various mailing list archives, but
> I don't have a pointer to it and there's no reasonable way to search
> for it.
>
> The patch in question was written by Matthew Wilcox; it added code to
> the SCSI async-scanning routines to utilize the scan_mutex. IMO it
> should have been applied to 2.6.23 but it wasn't.
Heh. It definitely hasn't gotten lost by "the git software". In fact, with
the kinds of hints you already gave, git makes it really _trivial_ to find
it.
Here's what you do:
git log v2.6.23.. --author=Wilcox
and then just search for "scan_mutex", in the hope that Matthew wrote a
nice commit message. And yes, he did, so in less than a blink you get:
commit 6b7f123f378743d739377871c0cbfbaf28c7d25a
Author: Matthew Wilcox <matthew@wil.cx>
Date: Tue Jun 26 15:18:51 2007 -0600
[SCSI] Fix async scanning double-add problems
Stress-testing and some thought has revealed some places where
asynchronous scanning needs some more attention to locking.
- Since async_scan is a bit, we need to hold the host_lock while
modifying it to prevent races against other CPUs modifying the word
that bit is in. This is probably a theoretical race for the moment,
but other patches may change that.
- The async_scan bit means not only that this host is being scanned
asynchronously, but that all the devices attached to this host are not
yet added to sysfs. So we must ensure that this bit is always in sync.
I've chosen to do this with the scan_mutex since it's already acquired
in most of the right places.
...
which I assume is the commit you're talking about.
Linus
next prev parent reply other threads:[~2007-11-29 23:10 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-29 4:00 [PATCH] base/class.c: prevent ooops due to insert/remove race Mark Lord
2007-11-29 4:33 ` Greg KH
2007-11-29 15:41 ` Mark Lord
2007-11-29 16:27 ` Greg KH
2007-11-29 17:45 ` Mark Lord
2007-11-29 17:48 ` Mark Lord
2007-11-29 17:50 ` Mark Lord
2007-11-29 18:09 ` [PATCH] base/class.c: prevent ooops due to insert/remove race (v3) Mark Lord
2007-11-29 18:12 ` Mark Lord
2007-11-29 19:20 ` [linux-usb-devel] " Alan Stern
2007-11-29 20:01 ` Mark Lord
2007-11-29 20:12 ` Greg KH
[not found] ` <474F1DB3.4030900@rtr.ca>
2007-11-29 20:25 ` Mark Lord
2007-11-29 20:32 ` Greg KH
2007-11-29 20:46 ` Mark Lord
2007-11-29 21:17 ` Greg KH
2007-11-29 22:07 ` Alan Stern
2007-11-29 22:11 ` Greg KH
2007-11-29 22:28 ` Mark Lord
2007-11-29 22:43 ` Alan Stern
2007-11-29 23:09 ` Linus Torvalds [this message]
2007-11-30 2:58 ` Alan Stern
2007-11-29 20:13 ` Alan Stern
2007-11-29 20:17 ` Mark Lord
2007-11-29 20:20 ` Mark Lord
2007-11-29 21:59 ` Alan Stern
2007-11-29 15:59 ` [PATCH] base/class.c: prevent ooops due to insert/remove race (v2) Mark Lord
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=alpine.LFD.0.9999.0711291505440.8458@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=lkml@rtr.ca \
--cc=stern@rowland.harvard.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®