diff options
author | Nithin Nayak Sujir <nsujir@broadcom.com> | 2011-04-25 15:30:07 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-05-01 12:52:18 -0400 |
commit | 0117ddb0c8df8e107bc8e9713c6638270638fff9 (patch) | |
tree | 3669946a4f7fe40a6624d7421d203be9c9aac557 /drivers/scsi/bnx2fc | |
parent | 112f661d6dac9af1235d2d05299fc2c9cb876ae7 (diff) |
[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')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 4 |
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) | |||
1352 | /* Free existing transmit skbs */ | 1352 | /* Free existing transmit skbs */ |
1353 | fcoe_clean_pending_queue(lport); | 1353 | fcoe_clean_pending_queue(lport); |
1354 | 1354 | ||
1355 | bnx2fc_interface_put(hba); | ||
1356 | |||
1357 | /* Free queued packets for the receive thread */ | 1355 | /* Free queued packets for the receive thread */ |
1358 | bnx2fc_clean_rx_queue(lport); | 1356 | bnx2fc_clean_rx_queue(lport); |
1359 | 1357 | ||
@@ -1372,6 +1370,8 @@ static void bnx2fc_if_destroy(struct fc_lport *lport) | |||
1372 | 1370 | ||
1373 | /* Release Scsi_Host */ | 1371 | /* Release Scsi_Host */ |
1374 | scsi_host_put(lport->host); | 1372 | scsi_host_put(lport->host); |
1373 | |||
1374 | bnx2fc_interface_put(hba); | ||
1375 | } | 1375 | } |
1376 | 1376 | ||
1377 | /** | 1377 | /** |