]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / EC: Ensure lock is acquired before accessing ec struct members
authorPuneet Kumar <puneetster@chromium.org>
Fri, 15 Nov 2013 19:41:29 +0000 (11:41 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 15 Nov 2013 22:18:27 +0000 (23:18 +0100)
commitabfb2d05bc65ec2ccd2a464341452e182cefa0e1
treee5351fc5dac51c8711f4fc1c469bb9d9a45b5a0b
parentaeade29d0d840e61f6d1df36c6c5e1c9a1f4f43c
ACPI / EC: Ensure lock is acquired before accessing ec struct members

A bug was introduced by commit b11c150f98be ('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: b11c150f98be ('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>
Cc: 3.8+ <stable@vger.kernel.org> # 3.8+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/ec.c