From: Bart Van Assche <bvanassche@acm.org>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: WARNING: at block/genhd.c:1474 __disk_unblock_events+0xe1/0xf0() -- should I be concerned?
Date: Wed, 14 Mar 2012 18:59:58 +0000 [thread overview]
Message-ID: <4F60EAAE.3070803@acm.org> (raw)
In-Reply-To: <4F5F6E34.6070208@msgid.tls.msk.ru>
On 03/13/12 15:56, Michael Tokarev wrote:
> WARNING: at block/genhd.c:1474 __disk_unblock_events+0x123/0x130()
Does the patch below help ? This patch prevents that sd_probe_async()
races with scsi_host_remove().
---
drivers/scsi/sd.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index c691fb5..7161fc1 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2544,6 +2544,7 @@ static void sd_probe_async(void *data, async_cookie_t cookie)
sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n",
sdp->removable ? "removable " : "");
scsi_autopm_put_device(sdp);
+ scsi_host_put(sdp->host);
put_device(&sdkp->dev);
}
@@ -2635,6 +2636,7 @@ static int sd_probe(struct device *dev)
dev_set_drvdata(dev, sdkp);
get_device(&sdkp->dev); /* prevent release before async_schedule */
+ scsi_host_get(sdp->host);
async_schedule(sd_probe_async, sdkp);
return 0;
--
1.7.7
next prev parent reply other threads:[~2012-03-14 19:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-04 14:19 WARNING: at block/genhd.c:1474 __disk_unblock_events+0xe1/0xf0() -- should I be concerned? Michael Tokarev
2012-03-05 6:35 ` Michael Tokarev
2012-03-05 17:56 ` Bart Van Assche
2012-03-13 15:56 ` Michael Tokarev
2012-03-14 18:59 ` Bart Van Assche [this message]
2012-03-14 22:05 ` Michael Tokarev
2012-03-16 22:27 ` Michael Tokarev
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=4F60EAAE.3070803@acm.org \
--to=bvanassche@acm.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mjt@tls.msk.ru \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.