]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: pm80xx: Fix dereferencing dangling pointer
authorVikram Auradkar <auradkar@google.com>
Thu, 14 Nov 2019 10:09:04 +0000 (15:39 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 20 Nov 2019 02:37:33 +0000 (21:37 -0500)
commitea7a08419383819f66f57c9c521ea508e7c203d6
tree756c71b5a5c51f2afcc1820d31e1162ccb9f3b72
parente34017aed4075bb33dffc6ac6ef1e44ada9ead30
scsi: pm80xx: Fix dereferencing dangling pointer

sas_task structure should not be used after task_done is called.  If the
device is gone or not attached, we call task_done on t and continue to use
in the sas_task in rest of the function. task_done is pointing to
sas_ata_task_done, may free the memory associated with the task before
returning.

Link: https://lore.kernel.org/r/20191114100910.6153-8-deepak.ukey@microchip.com
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Vikram Auradkar <auradkar@google.com>
Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com>
Signed-off-by: Viswas G <Viswas.G@microchip.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pm8001/pm8001_sas.c