[kernel] r15530 - in dists/sid/linux-2.6/debian/patches: bugfix/all series
Ben Hutchings
benh at alioth.debian.org
Thu Apr 22 01:56:26 UTC 2010
Author: benh
Date: Thu Apr 22 01:56:24 2010
New Revision: 15530
Log:
ACPI: EC: Limit burst to 64 bits
This is an incremental fix on top of "ACPI: EC: Allow multibyte access
to EC". Remove my previous fix to that patch, which is also included
in this.
Added:
dists/sid/linux-2.6/debian/patches/bugfix/all/ACPI-EC-Limit-burst-to-64-bits.patch
Modified:
dists/sid/linux-2.6/debian/patches/bugfix/all/ACPI-EC-Allow-multibyte-access-to-EC.patch
dists/sid/linux-2.6/debian/patches/series/12
Modified: dists/sid/linux-2.6/debian/patches/bugfix/all/ACPI-EC-Allow-multibyte-access-to-EC.patch
==============================================================================
--- dists/sid/linux-2.6/debian/patches/bugfix/all/ACPI-EC-Allow-multibyte-access-to-EC.patch Tue Apr 20 21:14:49 2010 (r15529)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/ACPI-EC-Allow-multibyte-access-to-EC.patch Thu Apr 22 01:56:24 2010 (r15530)
@@ -9,24 +9,22 @@
Signed-off-by: Alexey Starikovskiy <astarikovskiy at suse.de>
Signed-off-by: Len Brown <len.brown at intel.com>
[bwh: Backport to 2.6.32]
-[bwh: Add braces where they appear to be missing in the change to exprep.c]
--- a/drivers/acpi/acpica/exprep.c
+++ b/drivers/acpi/acpica/exprep.c
-@@ -468,6 +468,19 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
+@@ -468,6 +468,18 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
acpi_ut_add_reference(obj_desc->field.region_obj);
+ /* allow full data read from EC address space */
+ if (obj_desc->field.region_obj->region.space_id ==
+ ACPI_ADR_SPACE_EC) {
-+ if (obj_desc->common_field.bit_length > 8) {
++ if (obj_desc->common_field.bit_length > 8)
+ obj_desc->common_field.access_bit_width =
+ ACPI_ROUND_UP(obj_desc->common_field.
+ bit_length, 8);
+ obj_desc->common_field.access_byte_width =
+ ACPI_DIV_8(obj_desc->common_field.
+ access_bit_width);
-+ }
+ }
+
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/ACPI-EC-Limit-burst-to-64-bits.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/ACPI-EC-Limit-burst-to-64-bits.patch Thu Apr 22 01:56:24 2010 (r15530)
@@ -0,0 +1,54 @@
+From 2060c44576c79086ff24718878d7edaa7384a985 Mon Sep 17 00:00:00 2001
+From: Alexey Starikovskiy <astarikovskiy at suse.de>
+Date: Fri, 16 Apr 2010 15:36:40 -0400
+Subject: [PATCH] ACPI: EC: Limit burst to 64 bits
+
+access_bit_width field is u8 in ACPICA, thus 256 value written to it
+becomes 0, causing divide by zero later.
+
+Proper fix would be to remove access_bit_width at all, just because
+we already have access_byte_width, which is access_bit_width / 8.
+Limit access width to 64 bit for now.
+
+https://bugzilla.kernel.org/show_bug.cgi?id=15749
+fixes regression caused by the fix for:
+https://bugzilla.kernel.org/show_bug.cgi?id=14667
+
+Signed-off-by: Alexey Starikovskiy <astarikovskiy at suse.de>
+Signed-off-by: Len Brown <len.brown at intel.com>
+---
+ drivers/acpi/acpica/exprep.c | 17 +++++++++++------
+ 1 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/acpi/acpica/exprep.c b/drivers/acpi/acpica/exprep.c
+index a610ebe..2fbfe51 100644
+--- a/drivers/acpi/acpica/exprep.c
++++ b/drivers/acpi/acpica/exprep.c
+@@ -471,13 +471,18 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
+ /* allow full data read from EC address space */
+ if (obj_desc->field.region_obj->region.space_id ==
+ ACPI_ADR_SPACE_EC) {
+- if (obj_desc->common_field.bit_length > 8)
+- obj_desc->common_field.access_bit_width =
+- ACPI_ROUND_UP(obj_desc->common_field.
+- bit_length, 8);
++ if (obj_desc->common_field.bit_length > 8) {
++ unsigned width =
++ ACPI_ROUND_BITS_UP_TO_BYTES(
++ obj_desc->common_field.bit_length);
++ // access_bit_width is u8, don't overflow it
++ if (width > 8)
++ width = 8;
+ obj_desc->common_field.access_byte_width =
+- ACPI_DIV_8(obj_desc->common_field.
+- access_bit_width);
++ width;
++ obj_desc->common_field.access_bit_width =
++ 8 * width;
++ }
+ }
+
+ ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
+--
+1.7.0.3
+
Modified: dists/sid/linux-2.6/debian/patches/series/12
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/12 Tue Apr 20 21:14:49 2010 (r15529)
+++ dists/sid/linux-2.6/debian/patches/series/12 Thu Apr 22 01:56:24 2010 (r15530)
@@ -3,6 +3,7 @@
+ features/all/drivers-block-drbd-add.patch
+ bugfix/all/phylib-fix-typo-in-bcm6xx-PHY-driver-table.patch
+ bugfix/all/ACPI-EC-Allow-multibyte-access-to-EC.patch
++ bugfix/all/ACPI-EC-Limit-burst-to-64-bits.patch
+ features/arm/dns323-rev-a1-gpio-request.patch
+ bugfix/all/drm-i915-Stop-trying-to-use-ACPI-lid-status-to-deter.patch
+ bugfix/all/forcedeth-fix-tx-limit2-flag-check.patch
More information about the Kernel-svn-changes
mailing list