Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0117ddb0 authored by Nithin Nayak Sujir's avatar Nithin Nayak Sujir Committed by James Bottomley
Browse files

[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: default avatarNithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: default avatarBhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 112f661d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
}

/**