]> asedeno.scripts.mit.edu Git - linux.git/commit
scsi: hisi_sas: add check of device in hisi_sas_task_exec()
authorXiaofei Tan <tanxiaofei@huawei.com>
Wed, 9 May 2018 15:10:50 +0000 (23:10 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 18 May 2018 15:22:09 +0000 (11:22 -0400)
commit2f6bca202b78e2b63a62b46ff5dc26f300785e23
treeb0936707a2a080fad6abf7fde33615fd0c99e48c
parente85d93b21267fff56110e3a258b9fad8adbfbce3
scsi: hisi_sas: add check of device in hisi_sas_task_exec()

Currently we don't check that device is not gone before dereferencing
its elements in the function hisi_sas_task_exec() (specifically, the DQ
pointer).

This patch fixes this issue by filling in the DQ pointer in
hisi_sas_task_prep() after we check that the device pointer is still
safe to reference.

[mkp: typo]

Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.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