Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2018-10-12 12:14:58 +0200
committerHannes Reinecke <hare@suse.de>2018-10-12 12:40:40 +0200
commit576e8c79645af9c72fad8e995a5f8ae6c11e9d16 (patch)
tree21ce6020cfbfb6846e41d75c460395178492be79
parent1a15e26806eefeea5e43af5ee4fc70d74e75ca55 (diff)
scsi: qla2xxx: don't allow negative thresholds (bsc#1108870).
-rw-r--r--patches.fixes/scsi-qla2xxx-don-t-allow-negative-thresholds.patch36
-rw-r--r--series.conf3
2 files changed, 39 insertions, 0 deletions
diff --git a/patches.fixes/scsi-qla2xxx-don-t-allow-negative-thresholds.patch b/patches.fixes/scsi-qla2xxx-don-t-allow-negative-thresholds.patch
new file mode 100644
index 0000000000..0e509e2a97
--- /dev/null
+++ b/patches.fixes/scsi-qla2xxx-don-t-allow-negative-thresholds.patch
@@ -0,0 +1,36 @@
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Thu, 20 Sep 2018 13:02:36 +0300
+Subject: [PATCH] scsi: qla2xxx: don't allow negative thresholds
+Git-commit: 1703659dada8a5bfe9c31db6436792cbca1e26ea
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: Queued in subsystem maintainer repository
+References: bsc#1108870
+
+We shouldn't allow negative thresholds. I don't know what it would do
+but it can't be good.
+
+Fixes: 8b4673ba3a1b ("scsi: qla2xxx: Add support for ZIO6 interrupt threshold")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_attr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
+index a31d23905753..b28f159fdaee 100644
+--- a/drivers/scsi/qla2xxx/qla_attr.c
++++ b/drivers/scsi/qla2xxx/qla_attr.c
+@@ -1228,7 +1228,7 @@ qla_zio_threshold_store(struct device *dev, struct device_attribute *attr,
+ return -EINVAL;
+ if (sscanf(buf, "%d", &val) != 1)
+ return -EINVAL;
+- if (val > 256)
++ if (val < 0 || val > 256)
+ return -ERANGE;
+
+ atomic_set(&vha->hw->zio_threshold, val);
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index a2aff260be..a85521cc99 100644
--- a/series.conf
+++ b/series.conf
@@ -17919,6 +17919,9 @@
patches.suse/0005-MODSIGN-Allow-the-db-UEFI-variable-to-be-suppressed.patch
patches.suse/0006-modsign-Use-secondary-trust-keyring-for-module-signi.patch
+ # mkp/scsi 4.20/scsi-queue
+ patches.fixes/scsi-qla2xxx-don-t-allow-negative-thresholds.patch
+
# git://git.infradead.org/nvme.git nvme-4.20
patches.fixes/nvme_fc-add-nvme_discovery-sysfs-attribute-to-fc-tra.patch
patches.fixes/nvme-call-nvme_complete_rq-when-nvmf_check_ready-fai.patch