]> git.baikalelectronics.ru Git - kernel.git/commit
mvsas: remove SCSI host before detaching from SAS transport
authorJack Wang <jinpu.wang@profitbricks.com>
Thu, 5 Nov 2015 11:34:18 +0000 (12:34 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 10 Nov 2015 00:37:38 +0000 (19:37 -0500)
commitad1811f87c4ba2de8bcebc9e8f9d3d054c3d876f
tree3495030a3d43e85c12f78c2097d743c8044851f6
parent15dba754c8e78eca8aac9fde4375c8cc9a75b2fc
mvsas: remove SCSI host before detaching from SAS transport

commit 0f863c894798 ("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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mvsas/mv_init.c