qla2xxx: setup data needed in ISR before setting up the ISR
authorJohannes Thumshirn <jthumshirn@suse.de>
Wed, 6 Jul 2016 07:51:50 +0000 (09:51 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 15 Jul 2016 18:59:03 +0000 (14:59 -0400)
commitef8d1d51aa5ebe4b17b5e837d520df1e398b7adb
tree31c8f5f18803e25b7098a6b1cf895204d5bce344
parentcb05cbb389cd162db2d79e82ffaacc2451296ec2
qla2xxx: setup data needed in ISR before setting up the ISR

qla2xxx first calls request_irq() and then does the setup of the queue
entry data needed in the interrupt handlers in when using MSI-X. This
could lead to a NULL pointer dereference when an IRQ fires between the
request_irq() call and the assignment of the qentry data structure to
the rsp->msix field. A possible case for such a race would be in the
kdump case when the HBA's IRQs are still enabled but the driver is
undergoing a new initialisation and thus is not aware of already
activated IRQs in the HBA.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_isr.c