summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2009-10-19 20:07:48 (GMT)
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 18:00:19 (GMT)
commit7043110550f19c1556ad18dc4d63b1c9eaf9e4fd (patch)
tree62de06f36959a80c9943d10c10e9e59ce42a7bf8 /drivers
parent230934a6fe2f44d14ef840639f010c9cf4da098f (diff)
downloadlinux-7043110550f19c1556ad18dc4d63b1c9eaf9e4fd.tar.xz
[SCSI] ibmvfc: Fix locking in ibmvfc_remove
Need to grab the host lock around the call to ibmvfc_link_down. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvfc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index c35d805..d37230f 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -4420,7 +4420,11 @@ static int ibmvfc_remove(struct vio_dev *vdev)
ENTER;
ibmvfc_remove_trace_file(&vhost->host->shost_dev.kobj, &ibmvfc_trace_attr);
+
+ spin_lock_irqsave(vhost->host->host_lock, flags);
ibmvfc_link_down(vhost, IBMVFC_HOST_OFFLINE);
+ spin_unlock_irqrestore(vhost->host->host_lock, flags);
+
ibmvfc_wait_while_resetting(vhost);
ibmvfc_release_crq_queue(vhost);
kthread_stop(vhost->work_thread);