Skip to content

Commit

Permalink
scsi: qla2xxx: Fix memory corruption during hba reset test
Browse files Browse the repository at this point in the history
[ Upstream commit 2ce87cc ]

This patch fixes memory corrpution while performing HBA Reset test.

Following stack trace is seen:

[  466.397219] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
[  466.433669] IP: [<ffffffffc06f5dd0>] qlt_free_session_done+0x260/0x5f0 [qla2xxx]
[  466.467731] PGD 0
[  466.476718] Oops: 0000 [#1] SMP

Signed-off-by: Quinn Tran <[email protected]>
Signed-off-by: Himanshu Madhani <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Quinn Tran authored and gregkh committed May 25, 2018
1 parent 59ad4bb commit b0ef004
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/scsi/qla2xxx/qla_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -3581,6 +3581,8 @@ qla2x00_remove_one(struct pci_dev *pdev)
}
qla2x00_wait_for_hba_ready(base_vha);

qla2x00_wait_for_sess_deletion(base_vha);

/*
* if UNLOAD flag is already set, then continue unload,
* where it was set first.
Expand Down

0 comments on commit b0ef004

Please sign in to comment.