summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
diff options
context:
space:
mode:
authorNithin Nayak Sujir <nsujir@broadcom.com>2011-04-25 21:30:07 +0200
committerJames Bottomley <James.Bottomley@suse.de>2011-05-01 18:52:18 +0200
commit0117ddb0c8df8e107bc8e9713c6638270638fff9 (patch)
tree3669946a4f7fe40a6624d7421d203be9c9aac557 /drivers/scsi/bnx2fc/bnx2fc_fcoe.c
parent[SCSI] scsi_transport_fc: Fix deadlock during fc_remove_host (diff)
downloadlinux-0117ddb0c8df8e107bc8e9713c6638270638fff9.tar.xz
linux-0117ddb0c8df8e107bc8e9713c6638270638fff9.zip
[SCSI] bnx2fc: Release the reference to hba only after the interface is destroyed
Prematurely decrementing the reference may lead to cmd_mgr becoming NULL with the cmds are still active. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bnx2fc/bnx2fc_fcoe.c')
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index e2e647509a73..b936aee86db3 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -1352,8 +1352,6 @@ static void bnx2fc_if_destroy(struct fc_lport *lport)
/* Free existing transmit skbs */
fcoe_clean_pending_queue(lport);
- bnx2fc_interface_put(hba);
-
/* Free queued packets for the receive thread */
bnx2fc_clean_rx_queue(lport);
@@ -1372,6 +1370,8 @@ static void bnx2fc_if_destroy(struct fc_lport *lport)
/* Release Scsi_Host */
scsi_host_put(lport->host);
+
+ bnx2fc_interface_put(hba);
}
/**