]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: hisi_sas: Avoid accessing to SSP task for SMP I/Os
authorXiang Chen <chenxiang66@hisilicon.com>
Tue, 1 Sep 2020 11:13:03 +0000 (19:13 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 3 Sep 2020 02:49:07 +0000 (22:49 -0400)
commitad9da9c1d2eced914d521e203a42ea69b10715ef
tree566ca4f832e5dcbaad0d9f19e39ff2f49d664826
parent3ea27f595460682a13de854ddee4968804dd9b61
scsi: hisi_sas: Avoid accessing to SSP task for SMP I/Os

hisi_sas_slot_task_free() attempts to dereference SSP task for non-ATA
tasks. If the task is SMP, the code may reference the wrong structure
although this may not cause any problems.

To avoid this, only access to SSP task when slot->n_elem_dif is not 0 which
indicates this is an SSP task.

Link: https://lore.kernel.org/r/1598958790-232272-2-git-send-email-john.garry@huawei.com
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_main.c