* [PATCH 1/3] isci: remove SCSI host before detaching from SAS transport
@ 2015-11-05 11:32 Jack Wang
2015-11-05 15:09 ` Christoph Hellwig
2015-11-10 0:43 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Jack Wang @ 2015-11-05 11:32 UTC (permalink / raw)
To: linux-scsi, James.Bottomley, intel-linux-scu; +Cc: hch, brood, Jack Wang
commit cff549e4860f ("scsi: proper state checking and module refcount
handling in scsi_device_get")
, the reference count of scsi device was changed, which could lead to when
rmmod with at least on drive attached, SCSI error handle will
run into infinite loop, and lockup the system.
Fix it by remove scsi host first, this way scsi core will not send
commands down after detaching SAS transport.
This is a follow up fix for Benjamin's fix for pm80xx.
See also:
http://www.spinics.net/lists/linux-scsi/msg90088.html
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
---
drivers/scsi/isci/init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
index 0dfcabe..9e0d069 100644
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -272,11 +272,11 @@ static void isci_unregister(struct isci_host *isci_host)
if (!isci_host)
return;
+ shost = to_shost(isci_host);
+ scsi_remove_host(shost);
sas_unregister_ha(&isci_host->sas_ha);
- shost = to_shost(isci_host);
sas_remove_host(shost);
- scsi_remove_host(shost);
scsi_host_put(shost);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/3] isci: remove SCSI host before detaching from SAS transport
2015-11-05 11:32 [PATCH 1/3] isci: remove SCSI host before detaching from SAS transport Jack Wang
@ 2015-11-05 15:09 ` Christoph Hellwig
2015-11-10 0:43 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2015-11-05 15:09 UTC (permalink / raw)
To: Jack Wang; +Cc: linux-scsi, James.Bottomley, intel-linux-scu, hch, brood
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/3] isci: remove SCSI host before detaching from SAS transport
2015-11-05 11:32 [PATCH 1/3] isci: remove SCSI host before detaching from SAS transport Jack Wang
2015-11-05 15:09 ` Christoph Hellwig
@ 2015-11-10 0:43 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2015-11-10 0:43 UTC (permalink / raw)
To: Jack Wang; +Cc: linux-scsi, James.Bottomley, intel-linux-scu, hch, brood
>>>>> "Jack" == Jack Wang <jinpu.wang@profitbricks.com> writes:
Applied patches 1-3.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-10 0:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-05 11:32 [PATCH 1/3] isci: remove SCSI host before detaching from SAS transport Jack Wang
2015-11-05 15:09 ` Christoph Hellwig
2015-11-10 0:43 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox