scsi: lpfc: Fix sg_reset on SCSI device causing kernel crash
authorJames Smart <james.smart@broadcom.com>
Thu, 13 Oct 2016 22:06:04 +0000 (15:06 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 8 Nov 2016 22:29:49 +0000 (17:29 -0500)
commiteed695d70e7eff55595f222b55b96f105d4a27ca
treeee5417024083bb6332653ff22e74a4e48415f6df
parentdc58f44c2140748d96e33a533cd9e80692f58518
scsi: lpfc: Fix sg_reset on SCSI device causing kernel crash

Fix sg_reset on SCSI device causing kernel crash

Driver could reference stale node pointers in task mgmt call.
Changed to use resetting cmd and look up node pointer in task mgmt
function.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_scsi.c