]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Nov 2013 03:48:28 +0000 (19:48 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Nov 2013 03:48:28 +0000 (19:48 -0800)
added patches:
acpi-ec-ensure-lock-is-acquired-before-accessing-ec-struct-members.patch
acpi-hotplug-do-not-execute-insert-in-progress-_ost.patch
acpi-hotplug-fix-handle_root_bridge_removal.patch
acpi-video-quirk-initial-backlight-level-0.patch

queue-3.10/acpi-ec-ensure-lock-is-acquired-before-accessing-ec-struct-members.patch [new file with mode: 0644]
queue-3.10/acpi-hotplug-do-not-execute-insert-in-progress-_ost.patch [new file with mode: 0644]
queue-3.10/acpi-hotplug-fix-handle_root_bridge_removal.patch [new file with mode: 0644]
queue-3.10/acpi-video-quirk-initial-backlight-level-0.patch [new file with mode: 0644]
queue-3.10/series

diff --git a/queue-3.10/acpi-ec-ensure-lock-is-acquired-before-accessing-ec-struct-members.patch b/queue-3.10/acpi-ec-ensure-lock-is-acquired-before-accessing-ec-struct-members.patch
new file mode 100644 (file)
index 0000000..ec075c1
--- /dev/null
@@ -0,0 +1,43 @@
+From 36b15875a7819a2ec4cb5748ff7096ad7bd86cbb Mon Sep 17 00:00:00 2001
+From: Puneet Kumar <puneetster@chromium.org>
+Date: Fri, 15 Nov 2013 11:41:29 -0800
+Subject: ACPI / EC: Ensure lock is acquired before accessing ec struct members
+
+From: Puneet Kumar <puneetster@chromium.org>
+
+commit 36b15875a7819a2ec4cb5748ff7096ad7bd86cbb upstream.
+
+A bug was introduced by commit b76b51ba0cef ('ACPI / EC: Add more debug
+info and trivial code cleanup') that erroneously caused the struct member
+to be accessed before acquiring the required lock.  This change fixes
+it by ensuring the lock acquisition is done first.
+
+Found by Aaron Durbin <adurbin@chromium.org>
+
+Fixes: b76b51ba0cef ('ACPI / EC: Add more debug info and trivial code cleanup')
+References: http://crbug.com/319019
+Signed-off-by: Puneet Kumar <puneetster@chromium.org>
+Reviewed-by: Aaron Durbin <adurbin@chromium.org>
+[olof: Commit message reworded a bit]
+Signed-off-by: Olof Johansson <olof@lixom.net>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/ec.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/acpi/ec.c
++++ b/drivers/acpi/ec.c
+@@ -175,9 +175,10 @@ static void start_transaction(struct acp
+ static void advance_transaction(struct acpi_ec *ec, u8 status)
+ {
+       unsigned long flags;
+-      struct transaction *t = ec->curr;
++      struct transaction *t;
+       spin_lock_irqsave(&ec->lock, flags);
++      t = ec->curr;
+       if (!t)
+               goto unlock;
+       if (t->wlen > t->wi) {
diff --git a/queue-3.10/acpi-hotplug-do-not-execute-insert-in-progress-_ost.patch b/queue-3.10/acpi-hotplug-do-not-execute-insert-in-progress-_ost.patch
new file mode 100644 (file)
index 0000000..02b1057
--- /dev/null
@@ -0,0 +1,39 @@
+From 176a88d79d6b5aebabaff16734e8b3107efcaaad Mon Sep 17 00:00:00 2001
+From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+Date: Thu, 7 Nov 2013 01:42:17 +0100
+Subject: ACPI / hotplug: Do not execute "insert in progress" _OST
+
+From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+
+commit 176a88d79d6b5aebabaff16734e8b3107efcaaad upstream.
+
+According to the ACPI spec (5.0, Section 6.3.5), the "Device
+insertion in progress (pending)" (0x80) _OST status code is
+reserved for the "Insertion Processing" (0x200) source event
+which is "a result of an OSPM action".  Specifically, it is not
+a notification, so that status code should not be used during
+notification processing, which unfortunately is done by
+acpi_scan_bus_device_check().
+
+For this reason, drop the ACPI_OST_SC_INSERT_IN_PROGRESS _OST
+status evaluation from there (it was a mistake to put it in there
+in the first place).
+
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/scan.c |    2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/acpi/scan.c
++++ b/drivers/acpi/scan.c
+@@ -244,8 +244,6 @@ static void acpi_scan_bus_device_check(a
+                       goto out;
+               }
+       }
+-      acpi_evaluate_hotplug_ost(handle, ost_source,
+-                                ACPI_OST_SC_INSERT_IN_PROGRESS, NULL);
+       error = acpi_bus_scan(handle);
+       if (error) {
+               acpi_handle_warn(handle, "Namespace scan failure\n");
diff --git a/queue-3.10/acpi-hotplug-fix-handle_root_bridge_removal.patch b/queue-3.10/acpi-hotplug-fix-handle_root_bridge_removal.patch
new file mode 100644 (file)
index 0000000..7923788
--- /dev/null
@@ -0,0 +1,47 @@
+From 2441191a19039002b2c454a261fb45986df15184 Mon Sep 17 00:00:00 2001
+From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+Date: Thu, 7 Nov 2013 01:41:27 +0100
+Subject: ACPI / hotplug: Fix handle_root_bridge_removal()
+
+From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+
+commit 2441191a19039002b2c454a261fb45986df15184 upstream.
+
+It is required to do get_device() on the struct acpi_device in
+question before passing it to acpi_bus_hot_remove_device() through
+acpi_os_hotplug_execute(), because acpi_bus_hot_remove_device()
+calls acpi_scan_hot_remove() that does put_device() on that
+object.
+
+The ACPI PCI root removal routine, handle_root_bridge_removal(),
+doesn't do that, which may lead to premature freeing of the
+device object or to executing put_device() on an object that
+has been freed already.
+
+Fix this problem by making handle_root_bridge_removal() use
+get_device() as appropriate.
+
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Acked-by: Toshi Kani <toshi.kani@hp.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/pci_root.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/acpi/pci_root.c
++++ b/drivers/acpi/pci_root.c
+@@ -614,9 +614,12 @@ static void handle_root_bridge_removal(s
+       ej_event->device = device;
+       ej_event->event = ACPI_NOTIFY_EJECT_REQUEST;
++      get_device(&device->dev);
+       status = acpi_os_hotplug_execute(acpi_bus_hot_remove_device, ej_event);
+-      if (ACPI_FAILURE(status))
++      if (ACPI_FAILURE(status)) {
++              put_device(&device->dev);
+               kfree(ej_event);
++      }
+ }
+ static void _handle_hotplug_event_root(struct work_struct *work)
diff --git a/queue-3.10/acpi-video-quirk-initial-backlight-level-0.patch b/queue-3.10/acpi-video-quirk-initial-backlight-level-0.patch
new file mode 100644 (file)
index 0000000..8d629ed
--- /dev/null
@@ -0,0 +1,44 @@
+From 2c62333a408f5badd2d2ffd7177f95deeccc5ca4 Mon Sep 17 00:00:00 2001
+From: Aaron Lu <aaron.lu@intel.com>
+Date: Wed, 6 Nov 2013 09:07:10 +0800
+Subject: ACPI / video: Quirk initial backlight level 0
+
+From: Aaron Lu <aaron.lu@intel.com>
+
+commit 2c62333a408f5badd2d2ffd7177f95deeccc5ca4 upstream.
+
+Some firmware doesn't initialize initial backlight level to a proper
+value and _BQC will return 0 on first time evaluation. We used to be
+able to detect such incorrect value with our code logic, as value 0
+normally isn't a valid value in _BCL. But with the introduction of Win8,
+firmware begins to fill _BCL with values from 0 to 100, now 0 becomes
+a valid value but that value will make user's screen black. This patch
+test initial _BQC for value 0, if such a value is returned, do not use
+it.
+
+References: https://bugzilla.kernel.org/show_bug.cgi?id=64031
+References: https://bugzilla.kernel.org/show_bug.cgi?id=61231
+References: https://bugzilla.kernel.org/show_bug.cgi?id=63111
+Reported-by: Qingshuai Tian <qingshuai.tian@intel.com>
+Tested-by: Aaron Lu <aaron.lu@intel.com> # on "Idealpad u330p"
+Reported-and-tested-by: <erno@iki.fi> # on "Acer Aspire V5-573G"
+Reported-and-tested-by: Kirill Tkhai <tkhai@yandex.ru> # on "HP 250 G1"
+Signed-off-by: Aaron Lu <aaron.lu@intel.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/video.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/acpi/video.c
++++ b/drivers/acpi/video.c
+@@ -846,7 +846,7 @@ acpi_video_init_brightness(struct acpi_v
+               for (i = 2; i < br->count; i++)
+                       if (level_old == br->levels[i])
+                               break;
+-              if (i == br->count)
++              if (i == br->count || !level)
+                       level = max_level;
+       }
index 87468d0b1831330b4c1963852395a508c0ed4b37..de0e46c22ec1b5917ac08a929788862f5a6ad6e7 100644 (file)
@@ -17,3 +17,7 @@ sched-idle-fix-the-idle-polling-state-logic.patch
 pci-allow-pcie-capability-link-related-register-access-for-switches.patch
 pci-remove-pcie-capability-version-checks.patch
 pci-support-pcie-capability-slot-registers-only-for-ports-with-slots.patch
+acpi-ec-ensure-lock-is-acquired-before-accessing-ec-struct-members.patch
+acpi-video-quirk-initial-backlight-level-0.patch
+acpi-hotplug-fix-handle_root_bridge_removal.patch
+acpi-hotplug-do-not-execute-insert-in-progress-_ost.patch