]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: lpfc: devloss timeout race condition caused null pointer reference
authorJames Smart <jsmart2021@gmail.com>
Tue, 26 Jun 2018 15:24:29 +0000 (08:24 -0700)
committerBrian Maly <brian.maly@oracle.com>
Tue, 30 Oct 2018 18:29:53 +0000 (14:29 -0400)
commit31d475899607993be2e615fd31ec5f2a703c95c8
treeb448e6b7ca2f0ce713e5857fc1ee46aea4321d6e
parentee20ff651d2ce57932933f363a83ce0c1bfcf480
scsi: lpfc: devloss timeout race condition caused null pointer reference

Orabug: 27994179

A race condition between the context of devloss timeout handler and I/O
completion caused devloss timeout handler de-referencing pointer that had
been released.

Added the check in lpfc_sli_validate_fcp_iocb() on LPFC_IO_ON_TXCMPLQ to
capture the race condition of I/O completion and devloss timeout handler
attemption for aborting the I/O. Also, added check on lpfc_cmd->rdata
pointer before de-referenceing lpfc_cmd->rdata->pnode.

Also, added protection in lpfc_sli_abort_iocb() routine on driver performed
FCP I/O FLUSHING already under way before proceeding to aborting I/Os.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit b0e830125b669570d8096b8ba22eb00f659fc05e)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
Reviewed-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/scsi/lpfc/lpfc_scsi.c
drivers/scsi/lpfc/lpfc_sli.c