summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-07-15 14:18:57 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2016-07-15 22:13:52 +0300
commit0073887ae5e23bfadb76fc5951b1fcd508a7a3bd (patch)
tree527d9d3cc6611c0931af9a19da3b4dbca599048c /drivers/scsi
parent866d372e86aa256f3645b035c68350b08e182b9b (diff)
downloadlinux-0073887ae5e23bfadb76fc5951b1fcd508a7a3bd.tar.xz
ibmvfc: prevent a potential deadlock
My static checker complains that we need to unlock on this path. Seems true. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Brian King <brking@linux.vnet.ibm.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvfc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index fc523c3e5019..ab67ec4b6bd6 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -4722,6 +4722,8 @@ static void ibmvfc_rport_add_thread(struct work_struct *work)
tgt_dbg(tgt, "Setting rport roles\n");
fc_remote_port_rolechg(rport, tgt->ids.roles);
put_device(&rport->dev);
+ } else {
+ spin_unlock_irqrestore(vhost->host->host_lock, flags);
}
kref_put(&tgt->kref, ibmvfc_release_tgt);