Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2019-05-14 12:42:24 +0200
committerHannes Reinecke <hare@suse.de>2019-05-14 12:42:24 +0200
commit77602819f06c18311430ffb3b0f76aec15afda8f (patch)
tree68e6121faa637ccf356f25c6766f002745aa0534
parentc244e47c42a15e74a2e5546a9a0f09e5fa9c7a81 (diff)
lpfc: validate command in lpfc_sli4_scmd_to_wqidx_distr()
(bsc#1129138). suse-commit: c255cb434f715d51f1cd642b7e6d5b472d986593
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 100a4a5a5b99..d1aab85f5102 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -3932,7 +3932,8 @@ int lpfc_sli4_scmd_to_wqidx_distr(struct lpfc_hba *phba,
uint32_t tag;
uint16_t hwq;
- if (cmnd && shost_use_blk_mq(cmnd->device->host)) {
+ if (cmnd && shost_use_blk_mq(cmnd->device->host) &&
+ cmnd->request && cmnd->request->q) {
tag = blk_mq_unique_tag(cmnd->request);
hwq = blk_mq_unique_tag_to_hwq(tag);