[patch] ibmvfc: prevent a potential deadlock

Subsystems: ibm power virtual fc device drivers, linux for powerpc (32-bit and 64-bit), scsi subsystem, the rest

STALE3701d

2 messages, 2 authors, 2016-07-15 · open the first message on its own page

[patch] ibmvfc: prevent a potential deadlock

From: Dan Carpenter <hidden>
Date: 2016-07-15 11:18:57

My static checker complains that we need to unlock on this path.  Seems
true.

Signed-off-by: Dan Carpenter <redacted>
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index fc523c3..ab67ec4 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);

Re: [patch] ibmvfc: prevent a potential deadlock

From: Brian King <hidden>
Date: 2016-07-15 13:39:05

Reviewed-by: Brian King <redacted>

-- 
Brian King
Power Linux I/O
IBM Linux Technology Center
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help