diff options
author | Xiang Chen <[email protected]> | 2018-05-02 23:56:28 +0800 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2018-05-08 01:10:44 -0400 |
commit | c6ef895472696cac8e50f0ce69b301cc10233a67 (patch) | |
tree | ef923fcef58f4f466573f6cb19ed9d5584b57138 /tools/perf/scripts/python/sched-migration.py | |
parent | a14da7a20d499c54ebe53e430283e3bc17d3e89f (diff) |
scsi: hisi_sas: check sas_dev gone earlier in hisi_sas_abort_task()
It is possible to dereference a NULL-pointer in hisi_sas_abort_task() in
special scenario when the device has been removed.
If an SMP task times-out, it will call hisi_sas_abort_task() to
recover. And currently there is a check in hisi_sas_abort_task() to
avoid the situation of processing the abort for the removed device.
However we have an ordering problem, in that we may reference a task for
the removed device before checking if the device has been removed.
Fix this by only referencing the sas_dev after we know it is still
present.
Signed-off-by: Xiang Chen <[email protected]>
Signed-off-by: John Garry <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions