]> 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)
commited8f56dc3aed3500a4664fe43644330a304c5bd1
tree5fe44ac6f6602f214daf124a4b991acc2eb8ed8d
parentde51a2f29bb3d6603d170d6eeb70e45f660dda6a
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: da9ec3bfb501 ("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