ibmvfc: prevent a potential deadlock
Subsystems (4)
PATCH 1/1 ibmvfc: prevent a potential deadlock
My static checker complains that we need to unlock on this path. Seems true.
Signed-off-by Dan Carpenter <[email protected]>
drivers/scsi/ibmvscsi/ibmvfc.c +2 -0
@@ -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);
Reviewed-by Brian King <[email protected]>
Signature · 3 lines
Brian King Power Linux I/O IBM Linux Technology Center
Quoted 10 lines · Dan Carpenter
My static checker complains that we need to unlock on this path. Seems true.
Signed-off-by Dan Carpenter <[email protected]>drivers/scsi/ibmvscsi/ibmvfc.c +0
-0
drivers/scsi/ibmvscsi/ibmvfc.c static void ibmvfc_rport_add_thread(struct work_struct *work)
Quoted 9 lines
drivers/scsi/ibmvscsi/ibmvfc.c +2
-1@@ -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); --
Reviewed-by Ewan D. Milne <[email protected]>
Martin K. Petersen
AppliedQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Dan" = Dan Carpenter <[email protected]> writes:
Dan> My static checker complains that we need to unlock on this path. Dan> Seems true.
Applied to 4.8/scsi-queue.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering