Re: [RFC] How to fix an async scan - 'rmmod --wait' race?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/18/12 16:48, Tomas Henzl wrote:

> And long term goal were not to use try_module_get in scsi_device_get ?


With a properly implemented eh_abort_handler the patch below should
avoid that error handler functions get invoked after scsi_remove_host()
finished. This patch needs further testing though - a similar patch has
been reverted in the beginning of 2011 (see also commit
09c9d4c9b6a2b5909ae3c6265e4cd3820b636863). So I'm not entirely sure
whether the patch below is the right approach.

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 4aa41d1..c9f6000 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1691,6 +1691,7 @@ struct request_queue *scsi_alloc_queue(struct
scsi_device *sdev)
 void scsi_free_queue(struct request_queue *q)
 {
 	blk_cleanup_queue(q);
+	blk_abort_queue(q);
 }

 /*
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux