scsi: qla2xxx: Fix memory corruption during hba reset test
authorQuinn Tran <quinn.tran@cavium.com>
Tue, 23 Jan 2018 19:05:21 +0000 (11:05 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 May 2018 14:17:46 +0000 (16:17 +0200)
commitb0ef004e86cf7ddc9498a4db4d9624d3fd5b3c07
tree0f682f8f8eb21d413592ced5019b58b7a379d916
parent59ad4bb717141ee814db7843835c13e11032ed41
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: [<ffffffffc06f5dd0>] qlt_free_session_done+0x260/0x5f0 [qla2xxx]
[  466.467731] PGD 0
[  466.476718] Oops: 0000 [#1] SMP

Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/qla2xxx/qla_os.c