Home Home > GIT Browse > SLE15-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
commitc255cb434f715d51f1cd642b7e6d5b472d986593 (patch)
tree35be133a4718ae3f9c442a039cb2eef5e94e4ebe
parentcaca066552e5c38fe50fba9f525b0714bb130b0e (diff)
lpfc: validate command in lpfc_sli4_scmd_to_wqidx_distr()
(bsc#1129138).
-rw-r--r--patches.suse/lpfc-validate-command-in-lpfc_sli4_scmd_to_wqidx_dis.patch32
-rw-r--r--series.conf1
2 files changed, 33 insertions, 0 deletions
diff --git a/patches.suse/lpfc-validate-command-in-lpfc_sli4_scmd_to_wqidx_dis.patch b/patches.suse/lpfc-validate-command-in-lpfc_sli4_scmd_to_wqidx_dis.patch
new file mode 100644
index 0000000000..ed07c65ac5
--- /dev/null
+++ b/patches.suse/lpfc-validate-command-in-lpfc_sli4_scmd_to_wqidx_dis.patch
@@ -0,0 +1,32 @@
+From: Hannes Reinecke <hare@suse.de>
+Date: Tue, 14 May 2019 12:36:46 +0200
+Subject: [PATCH] lpfc: validate command in lpfc_sli4_scmd_to_wqidx_distr()
+References: bsc#1129138
+Patch-Mainline: never, SLE15 specific
+
+According to Broadcom we need to validate the command to avoid
+crashes with blk-mq.
+
+Suggested-by: Justin Tee <justin.tee@broadcom.com>
+Signed-off-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/lpfc/lpfc_scsi.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+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);
+
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index cbebcbfc81..8dcc990d05 100644
--- a/series.conf
+++ b/series.conf
@@ -21899,6 +21899,7 @@
patches.fixes/ch-fixup-refcounting-imbalance-for-SCSI-devices.patch
patches.suse/scsi-libsas-allocate-sense-buffer-for-bsg-queue.patch
patches.fixes/qla2xxx-always-allocate-qla_tgt_wq.patch
+ patches.suse/lpfc-validate-command-in-lpfc_sli4_scmd_to_wqidx_dis.patch
########################################################
# end of sorted patches