[3.8.y.z extended stable] Patch "ACPI / EC: Ensure lock is acquired before accessing ec struct members" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Fri Dec 6 23:08:43 UTC 2013
This is a note to let you know that I have just added a patch titled
ACPI / EC: Ensure lock is acquired before accessing ec struct members
to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue
This patch is scheduled to be released in version 3.8.13.14.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.8.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From df8c26083bc79f73e8caa2545a8fe43a43aec570 Mon Sep 17 00:00:00 2001
From: Puneet Kumar <puneetster at chromium.org>
Date: Fri, 15 Nov 2013 11:41:29 -0800
Subject: ACPI / EC: Ensure lock is acquired before accessing ec struct members
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 at 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 at chromium.org>
Reviewed-by: Aaron Durbin <adurbin at chromium.org>
[olof: Commit message reworded a bit]
Signed-off-by: Olof Johansson <olof at lixom.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki at intel.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/acpi/ec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 0b58c9d..97fcfb0 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -175,9 +175,10 @@ static void start_transaction(struct acpi_ec *ec)
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) {
--
1.8.3.2
More information about the kernel-team
mailing list