From: Mike Anderson <andmike@us.ibm.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-scsi@vger.kernel.org, James.Bottomley@steeleye.com,
Andrew Morton <akpm@osdl.org>,
Matthew Dharm <mdharm-usb@one-eyed-alien.net>,
Alan Stern <stern@rowland.harvard.edu>
Subject: Re: [Patch] Fix oops on rmmod usb-storage
Date: Wed, 29 Sep 2004 10:12:51 -0700 [thread overview]
Message-ID: <20040929171251.GA5368@us.ibm.com> (raw)
In-Reply-To: <415AAB0F.2080802@suse.de>
Hannes Reinecke [hare@suse.de] wrote:
> Christoph Hellwig wrote:
> >[please send scsi issues to linux-scsi, thanks]
> >
> >
> >>It turned out that in drivers/scsi/hosts.c:scsi_remove_host()
> >>first the host is removed with scsi_forget_host() and _then_ all
> >>outstanding I/O to this host is cancelled with scsi_host_cancel().
> >>Sounds a bit fishy as scsi_host_cancel() tries to talk to a host which
> >>we just have deleted ...
> >>(Incidentally, this is most likely the same bug as Bug #2752 and #3480
> >>from bugme.osdl.org :-).
> >>(And also #133249 from bugzilla.redhat.com :-).
> >>
> >>The attached patch corrects this.
> >>Please apply.
> >
> >
> >I'ts not that easy. If we cancel the host first we won't get our write
> >caches flushed because the drivers don't accept the SYNCRHONIZE_CACHE.
> >command in cancelled state. Mike just changed the order to what it is
> >now a short while ago.
> >
> Yeah, Jens Axboe just pointed that out.
>
> >So we'll have to find a way to send a SYNCHRNOZIE_CACHE command even
> >in canncelled state.
> >
> >In fact I can't see how these problems could happen, and that they only
> >happen with usb-storage seems strange.
> Well, the thing is: When usb-storage calls scsi_remove_host() the device
> is already gone; whether or not we can synchronize the cache is a moot
> point there.
>
> And if I understood the comment to the Changeset properly, the patch was
> just to remove the 'Synchronizing SCSI cache' message.
> I can live with that. Kernel Oops is much worse.
>
Just a clarification. The patch was also to allow the sending of
the 'Synchronizing SCSI cache' message on rmmod. Prior to the change not
only was the message generated, but also no command was sent either for
devices that wanted one.
The scsi_remove_host interface does not have a method to distinguish
between clean and unexpected removals.
A pointer to the archives that has a partial discussion on a previously
more complicated change and the current change of reordering.
http://marc.theaimsgroup.com/?t=108701426000002&r=1&w=2
While James patch looks like it will address the issues in the error
handler ref counting. It would be best not to enter the error handler at
all.
We may want to reconsider a method to distinguish unexpected removals
from clean removals.
-andmike
--
Michael Anderson
andmike@us.ibm.com
next prev parent reply other threads:[~2004-09-29 17:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <415A67B8.2080003@suse.de>
2004-09-29 12:03 ` [Patch] Fix oops on rmmod usb-storage Christoph Hellwig
2004-09-29 12:31 ` Hannes Reinecke
2004-09-29 17:12 ` Mike Anderson [this message]
2004-09-29 17:19 ` James Bottomley
2004-09-29 17:22 ` Christoph Hellwig
2004-09-29 17:36 ` Mike Anderson
2004-09-29 17:38 ` Christoph Hellwig
2004-09-29 17:50 ` Alan Stern
2004-09-29 18:32 ` Mike Anderson
2004-09-29 18:58 ` Alan Stern
2004-09-30 8:09 ` Hannes Reinecke
2004-09-30 18:14 ` Alan Stern
2004-10-01 7:11 ` Hannes Reinecke
2004-10-01 16:07 ` Alan Stern
2004-09-29 17:52 ` Mike Anderson
2004-09-29 13:56 ` James Bottomley
2004-09-29 13:17 ` Alan Cox
2004-09-29 14:24 ` James Bottomley
2004-09-29 14:44 ` Hannes Reinecke
2004-09-29 15:15 ` James Bottomley
2004-09-29 15:28 ` Matthew Wilcox
2004-09-29 15:35 ` James Bottomley
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=20040929171251.GA5368@us.ibm.com \
--to=andmike@us.ibm.com \
--cc=James.Bottomley@steeleye.com \
--cc=akpm@osdl.org \
--cc=hare@suse.de \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mdharm-usb@one-eyed-alien.net \
--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;
as well as URLs for NNTP newsgroup(s).