* [PATCH] scsi: need to reset unprep_rq_fn in sd_remove
@ 2010-07-03 14:07 FUJITA Tomonori
2010-07-05 6:56 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: FUJITA Tomonori @ 2010-07-03 14:07 UTC (permalink / raw)
To: jens.axboe; +Cc: James.Bottomley, hch, snitzer, linux-scsi
This is for block's for-2.6.36.
=
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: [PATCH] scsi: need to reset unprep_rq_fn in sd_remove
We need to reset q->unprep_rq_fn in sd_remove. Otherwise we hit kernel
oops if we access to a scsi disk device via sg after removing scsi
disk module.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
drivers/scsi/sd.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index aa6b48b..b13dffb 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2378,6 +2378,7 @@ static int sd_remove(struct device *dev)
async_synchronize_full();
sdkp = dev_get_drvdata(dev);
blk_queue_prep_rq(sdkp->device->request_queue, scsi_prep_fn);
+ blk_queue_unprep_rq(sdkp->device->request_queue, NULL);
device_del(&sdkp->dev);
del_gendisk(sdkp->disk);
sd_shutdown(dev);
--
1.6.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-05 6:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-03 14:07 [PATCH] scsi: need to reset unprep_rq_fn in sd_remove FUJITA Tomonori
2010-07-05 6:56 ` Jens Axboe
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).