]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
scsi: hisi_sas: Fix to only call scsi_get_prot_op() for non-NULL scsi_cmnd
authorJohn Garry <john.garry@huawei.com>
Fri, 25 Jan 2019 14:22:38 +0000 (22:22 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 1 Apr 2019 19:08:05 +0000 (14:08 -0500)
commit5068e7b92c36a83d7bc8758f48e5ff9b70d4e658
tree29a18e1aa7bea78d2606d2bf786554e7bb7b6135
parentf12503f080fa2aa287b51e04d939f1acae3fd88f
scsi: hisi_sas: Fix to only call scsi_get_prot_op() for non-NULL scsi_cmnd

BugLink: https://bugs.launchpad.net/bugs/1822385
A NULL-pointer dereference was introduced for TMF SSP commands from the
upstreaming reworking.

Fix this by relocating the scsi_get_prot_op() callsite.

Fixes: d6a9000b81be ("scsi: hisi_sas: Add support for DIF feature for v2 hw")
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit e1ba0b0b44512c5a209526c09ea3eb7d256b6951)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c