diff options
author | Bart Van Assche <bvanassche@acm.org> | 2019-08-08 20:02:19 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-08-12 21:39:46 -0400 |
commit | d1436e456b840162eb4d162f99055d2adb79a566 (patch) | |
tree | f015230bb7b89d8df32ac8e206a683062da82eca /drivers | |
parent | fe6b52c9adbcce03c549d07c3db06b1694581225 (diff) | |
download | linux-d1436e456b840162eb4d162f99055d2adb79a566.tar.bz2 |
scsi: qla2xxx: Fix a NULL pointer dereference
BUG: KASAN: null-ptr-deref in qla24xx_handle_plogi_done_event+0x134/0x9f0 [qla2xxx]
Read of size 4 at addr 00000000000000a0 by task swapper/2/0
CPU: 2 PID: 0 Comm: swapper/2 Not tainted 5.2.0-dbg+ #1
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
Call Trace:
<IRQ>
dump_stack+0x8a/0xd6
__kasan_report.cold+0x5/0x41
kasan_report+0x16/0x20
__asan_load4+0x7e/0x80
qla24xx_handle_plogi_done_event+0x134/0x9f0 [qla2xxx]
qla2x00_els_dcmd2_sp_done+0x15f/0x230 [qla2xxx]
qla24xx_els_ct_entry+0x3b3/0x610 [qla2xxx]
qla24xx_process_response_queue+0x514/0x10e0 [qla2xxx]
qla24xx_msix_rsp_q+0x80/0x100 [qla2xxx]
__handle_irq_event_percpu+0x72/0x450
handle_irq_event_percpu+0x74/0xf0
handle_irq_event+0x5e/0x8f
handle_edge_irq+0x13a/0x320
handle_irq+0x30/0x40
do_IRQ+0x91/0x190
common_interrupt+0xf/0xf
</IRQ>
RIP: 0010:default_idle+0x31/0x230
Fixes: 8777e4314d39 ("scsi: qla2xxx: Migrate NVME N2N handling into state machine") # v4.19.
Cc: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_iocb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index 7021fbeb6d23..e92e52aa6e9b 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c @@ -2755,7 +2755,8 @@ static void qla2x00_els_dcmd2_sp_done(srb_t *sp, int res) } else { memset(&ea, 0, sizeof(ea)); ea.fcport = fcport; - ea.rc = res; + ea.data[0] = MBS_COMMAND_COMPLETE; + ea.sp = sp; qla24xx_handle_plogi_done_event(vha, &ea); } |