Fix incorrect size calculations in megaraid with 64K pages (rhbz 1269300)
This commit is contained in:
parent
5006f99211
commit
3f2c6343fd
@ -599,6 +599,9 @@ Patch550: KVM-x86-work-around-infinite-loop-in-microcode-when-.patch
|
||||
#CVE-2015-8104 rhbz 1278496 1279691
|
||||
Patch551: KVM-svm-unconditionally-intercept-DB.patch
|
||||
|
||||
#rhbz 1269300
|
||||
Patch552: megaraid_sas-Do-not-use-PAGE_SIZE-for-max_sectors.patch
|
||||
|
||||
# END OF PATCH DEFINITIONS
|
||||
|
||||
%endif
|
||||
@ -2043,6 +2046,7 @@ fi
|
||||
#
|
||||
%changelog
|
||||
* Tue Nov 10 2015 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- Fix incorrect size calculations in megaraid with 64K pages (rhbz 1269300)
|
||||
- CVE-2015-8104 kvm: DoS infinite loop in microcode DB exception (rhbz 1278496 1279691)
|
||||
- CVE-2015-5307 kvm: DoS infinite loop in microcode AC exception (rhbz 1277172 1279688)
|
||||
|
||||
|
50
megaraid_sas-Do-not-use-PAGE_SIZE-for-max_sectors.patch
Normal file
50
megaraid_sas-Do-not-use-PAGE_SIZE-for-max_sectors.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From c6f081c88ab76d5a40365b94c1f5839e099b2b2b Mon Sep 17 00:00:00 2001
|
||||
From: "sumit.saxena@avagotech.com" <sumit.saxena@avagotech.com>
|
||||
Date: Thu, 15 Oct 2015 13:40:04 +0530
|
||||
Subject: [PATCH] megaraid_sas: Do not use PAGE_SIZE for max_sectors
|
||||
|
||||
Do not use PAGE_SIZE marco to calculate max_sectors per I/O
|
||||
request. Driver code assumes PAGE_SIZE will be always 4096 which can
|
||||
lead to wrongly calculated value if PAGE_SIZE is not 4096. This issue
|
||||
was reported in Ubuntu Bugzilla Bug #1475166.
|
||||
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
|
||||
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
|
||||
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
|
||||
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
|
||||
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
||||
---
|
||||
drivers/scsi/megaraid/megaraid_sas.h | 2 ++
|
||||
drivers/scsi/megaraid/megaraid_sas_base.c | 2 +-
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
|
||||
index 20c37541963f..ebf821b94cb6 100644
|
||||
--- a/drivers/scsi/megaraid/megaraid_sas.h
|
||||
+++ b/drivers/scsi/megaraid/megaraid_sas.h
|
||||
@@ -364,6 +364,8 @@ enum MR_EVT_ARGS {
|
||||
MR_EVT_ARGS_GENERIC,
|
||||
};
|
||||
|
||||
+
|
||||
+#define SGE_BUFFER_SIZE 4096
|
||||
/*
|
||||
* define constants for device list query options
|
||||
*/
|
||||
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
|
||||
index eaa81e552fd2..a9eb10ebc6ed 100644
|
||||
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
|
||||
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
|
||||
@@ -4752,7 +4752,7 @@ static int megasas_init_fw(struct megasas_instance *instance)
|
||||
|
||||
|
||||
instance->max_sectors_per_req = instance->max_num_sge *
|
||||
- PAGE_SIZE / 512;
|
||||
+ SGE_BUFFER_SIZE / 512;
|
||||
if (tmp_sectors && (instance->max_sectors_per_req > tmp_sectors))
|
||||
instance->max_sectors_per_req = tmp_sectors;
|
||||
|
||||
--
|
||||
2.4.3
|
||||
|
Loading…
Reference in New Issue
Block a user