]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
scsi: hisi_sas: release SMP slot in lldd_abort_task
authorXiang Chen <chenxiang66@hisilicon.com>
Wed, 22 Mar 2017 17:25:36 +0000 (01:25 +0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 28 Jun 2017 14:24:05 +0000 (11:24 -0300)
commit71eac89843219fe7800e05e80d6663e7be16cd6c
tree0f4f80e1ac63fde7b2e3c8e9921e3e6a680d7f27
parentf4984954876414070227ec6511882dfe584a97dc
scsi: hisi_sas: release SMP slot in lldd_abort_task

BugLink: https://bugs.launchpad.net/bugs/1695999
When an SMP task timeouts, it will call lldd_abort_task to release the
associated slot, and then will release the sas_task.

Currently in lldd_abort_task, if we fail to internally abort IO, then
the slot of SMP IO is not released, but sas_task will still be later
released, so the slot's sas_task is NULL, which will cause NULL pointer
when hisi_sas_slot_task_free happens later.

To resolve, check the return value of internal abort, and release the
slot if it failed.

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>
(cherry picked from commit ccbfe5a05a5be7670d1b91ad07d8b1f3b9dbd45e)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/scsi/hisi_sas/hisi_sas_main.c