From: Quinn Tran Date: Tue, 23 Jan 2018 19:05:21 +0000 (-0800) Subject: scsi: qla2xxx: Fix memory corruption during hba reset test X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b0ef004e86cf7ddc9498a4db4d9624d3fd5b3c07;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git scsi: qla2xxx: Fix memory corruption during hba reset test [ Upstream commit 2ce87cc5b269510de9ca1185ca8a6e10ec78c069 ] 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: [] qlt_free_session_done+0x260/0x5f0 [qla2xxx] [ 466.467731] PGD 0 [ 466.476718] Oops: 0000 [#1] SMP Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 8e7c0626f8b5..1be76695e692 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -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.