From: Dan Carpenter Date: Fri, 15 Jul 2016 11:18:57 +0000 (+0300) Subject: ibmvfc: prevent a potential deadlock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0073887ae5e23bfadb76fc5951b1fcd508a7a3bd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ibmvfc: prevent a potential deadlock My static checker complains that we need to unlock on this path. Seems true. Signed-off-by: Dan Carpenter Reviewed-by: Brian King Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen --- 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);