From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Steven Whitehouse <swhiteho@redhat.com>
Cc: Tejun Heo <tj@kernel.org>,
linux-kernel@vger.kernel.org, Jens Axboe <jaxboe@fusionio.com>
Subject: Re: Strange block/scsi/workqueue issue
Date: Tue, 12 Apr 2011 12:41:30 -0500 [thread overview]
Message-ID: <1302630090.2604.30.camel@mulgrave.site> (raw)
In-Reply-To: <1302627097.2661.25.camel@dolmen>
On Tue, 2011-04-12 at 17:51 +0100, Steven Whitehouse wrote:
> Still not quite there, but looking more hopeful now,
Not sure I share your optimism; but this one
> scsi 0:2:1:0: Direct-Access DELL PERC 6/i 1.22 PQ: 0 ANSI: 5
> scsi: killing requests for dead queue
> ------------[ cut here ]------------
> WARNING: at lib/kref.c:34 kref_get+0x2d/0x30()
> Hardware name: PowerEdge R710
> Modules linked in:
> Pid: 386, comm: kworker/6:1 Not tainted 2.6.39-rc2+ #193
> Call Trace:
> [<ffffffff8108fa9a>] warn_slowpath_common+0x7a/0xb0
> [<ffffffff8108fae5>] warn_slowpath_null+0x15/0x20
> [<ffffffff813c984d>] kref_get+0x2d/0x30
> [<ffffffff813c824a>] kobject_get+0x1a/0x30
> [<ffffffff81460874>] get_device+0x14/0x20
> [<ffffffff81478bd7>] scsi_request_fn+0x37/0x4a0
Is definitely a race between the last put of the SCSI device and the
block delayed work. The signal that mediates that race is supposed to
be the q->queuedata being null, but that doesn't get set until some time
into the release function (by which time the ref is already zero).
Closing the window completely involves setting this to NULL before we do
the final put when we know everything else is gone. So, here's the next
incremental.
James
---
Index: linux-2.6/drivers/scsi/scsi_sysfs.c
===================================================================
--- linux-2.6.orig/drivers/scsi/scsi_sysfs.c
+++ linux-2.6/drivers/scsi/scsi_sysfs.c
@@ -323,7 +323,6 @@ static void scsi_device_dev_release_user
}
if (sdev->request_queue) {
- sdev->request_queue->queuedata = NULL;
/* user context needed to free queue */
scsi_free_queue(sdev->request_queue);
/* temporary expedient, try to catch use of queue lock
@@ -937,6 +936,7 @@ void __scsi_remove_device(struct scsi_de
if (sdev->host->hostt->slave_destroy)
sdev->host->hostt->slave_destroy(sdev);
transport_destroy_device(dev);
+ sdev->request_queue->queuedata = NULL;
put_device(dev);
}
next prev parent reply other threads:[~2011-04-12 17:41 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-11 14:56 Steven Whitehouse
2011-04-11 17:18 ` Tejun Heo
2011-04-11 17:29 ` Jens Axboe
2011-04-11 17:52 ` Steven Whitehouse
2011-04-12 0:14 ` Tejun Heo
2011-04-12 8:49 ` Steven Whitehouse
2011-04-12 0:47 ` James Bottomley
2011-04-12 2:51 ` Tejun Heo
2011-04-12 4:49 ` James Bottomley
2011-04-12 5:02 ` James Bottomley
2011-04-12 8:42 ` Steven Whitehouse
2011-04-12 13:42 ` James Bottomley
2011-04-12 14:06 ` Steven Whitehouse
2011-04-12 15:14 ` James Bottomley
2011-04-12 16:04 ` Steven Whitehouse
2011-04-12 16:27 ` James Bottomley
2011-04-12 16:51 ` Steven Whitehouse
2011-04-12 17:41 ` James Bottomley [this message]
2011-04-12 18:33 ` Steven Whitehouse
2011-04-12 19:56 ` James Bottomley
2011-04-12 20:30 ` Steven Whitehouse
2011-04-12 20:43 ` James Bottomley
2011-04-13 5:18 ` Tejun Heo
2011-04-13 6:06 ` Tejun Heo
2011-04-13 9:20 ` Steven Whitehouse
2011-04-13 14:00 ` Steven Whitehouse
2011-04-13 17:01 ` James Bottomley
2011-04-13 19:35 ` Steven Whitehouse
2011-04-13 20:12 ` Jens Axboe
2011-04-13 20:17 ` James Bottomley
2011-04-22 18:01 ` Tejun Heo
2011-04-22 18:06 ` James Bottomley
2011-04-22 18:30 ` Tejun Heo
2011-05-31 6:05 ` Anton V. Boyarshinov
2011-04-22 18:03 ` Tejun Heo
2011-04-12 5:15 ` Tejun Heo
2011-04-12 15:15 ` James Bottomley
2011-04-13 5:11 ` Tejun Heo
2011-04-13 14:15 ` 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=1302630090.2604.30.camel@mulgrave.site \
--to=james.bottomley@hansenpartnership.com \
--cc=jaxboe@fusionio.com \
--cc=linux-kernel@vger.kernel.org \
--cc=swhiteho@redhat.com \
--cc=tj@kernel.org \
/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®