]> git.baikalelectronics.ru Git - 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)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 29 Jan 2019 06:41:20 +0000 (01:41 -0500)
commitcdea0412e688d2b496678ad3710012ae923e607d
tree5fe44ac6f6602f214daf124a4b991acc2eb8ed8d
parent0d46e13802d9ed4273a143498acfb97f2cb1b41a
scsi: hisi_sas: Fix to only call scsi_get_prot_op() for non-NULL scsi_cmnd

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: e474b18e2f82 ("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>
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c