From: Pete Wyckoff <pw@osc.edu>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Pierre Ossman <drzeus@drzeus.cx>,
Jens Axboe <jens.axboe@oracle.com>,
bugme-daemon@bugzilla.kernel.org, gentuu@gmail.com,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [Bugme-new] [Bug 9674] New: Oops during rmmod'ing modeuls sdhci, sr_mod, ricoh_mmc, mmc_core
Date: Wed, 2 Jan 2008 10:49:51 -0500 [thread overview]
Message-ID: <20080102154951.GA8976@osc.edu> (raw)
In-Reply-To: <1199244283.3252.13.camel@localhost.localdomain>
James.Bottomley@HansenPartnership.com wrote on Tue, 01 Jan 2008 21:24 -0600:
>
> On Tue, 2008-01-01 at 18:10 -0800, Andrew Morton wrote:
> > On Tue, 1 Jan 2008 14:55:45 -0800 (PST) bugme-daemon@bugzilla.kernel.org wrote:
> >
> > > http://bugzilla.kernel.org/show_bug.cgi?id=9674
> > >
> > > Summary: Oops during rmmod'ing modeuls sdhci, sr_mod, ricoh_mmc,
> > > mmc_core
> >
> > Guys, this is a very recent regression. Could you please take a look, see
> > if it's due to mmc, block or scsi changes?
>
> There's not a lot of information to go on. The stack trace looks bogus,
> so I guess the kernel is compiled without a frame pointer. However, it
> does look like the initial insertion of sr_mod is going through and it
> generates a command which gets into scsi_request_fn and then indirects
> through a bogus queueucommand pointer.
Bogus prep_rq_fn actually.
> What's the actual underlying device the cdrom is attached to?
>
> There's no real changes to SCSI in this area from 2.6.24-rc4 ...
> however, the reinsertion is suggestive, it's like the removal is
> retriggering a module request for some reason.
Here's a guess. When sr_mod is removed, it looks like the request
queue prep_rq_fn is still pointing to the now nonexistent
sr_prep_fn. This may have been due to a commit that went in early
2.6.24:
commit 7f9a6bc4e9d59e7fcf03ed23f60cd81ca5d80b65
Author: James Bottomley <James.Bottomley@steeleye.com>
Date: Sat Aug 4 10:06:25 2007 -0500
[SCSI] move ULD attachment into the prep function
One of the intents of the block prep function was to allow ULDs to use
it for preprocessing. The original SCSI model was to have a single prep
function and add a pointer indirect filter to build the necessary
commands. This patch reverses that, does away with the init_command
field of the scsi_driver structure and makes ULDs attach directly to the
prep function instead. The value is really that it allows us to begin
to separate the ULDs from the SCSI mid layer (as long as they don't use
any core functions---which is hard at the moment---a ULD doesn't even
need SCSI to bind).
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
When the module is re-inserted, it does a few SCSI commands before
setting up the new prep_rq_fn, presumably hitting this bogus
pointer.
One fix would be to have sr remember the original prep function and
restore it in sr_kref_release. Sd and a few other drivers have this
issue. Ide-cd bothers to set prep_rq_fn to NULL as it releases
the device.
-- Pete
next prev parent reply other threads:[~2008-01-02 15:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-9674-10286@http.bugzilla.kernel.org/>
[not found] ` <20080101181026.38298e13.akpm@linux-foundation.org>
2008-01-02 3:24 ` [Bugme-new] [Bug 9674] New: Oops during rmmod'ing modeuls sdhci, sr_mod, ricoh_mmc, mmc_core James Bottomley
2008-01-02 12:21 ` Rafael J. Wysocki
2008-01-02 15:41 ` James Bottomley
2008-01-02 15:49 ` Pete Wyckoff [this message]
2008-01-02 16:33 ` James Bottomley
2008-01-02 17:14 ` [PATCH] scsi_sysfs: restore prep_fn when ULD is removed 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=20080102154951.GA8976@osc.edu \
--to=pw@osc.edu \
--cc=James.Bottomley@HansenPartnership.com \
--cc=akpm@linux-foundation.org \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=drzeus@drzeus.cx \
--cc=gentuu@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=linux-scsi@vger.kernel.org \
--cc=rjw@sisk.pl \
/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).