diff options
author | Lv Zheng <lv.zheng@intel.com> | 2014-12-01 19:56:55 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-12-02 18:29:59 -0500 |
commit | 7dd882195695871d6da046de036214d32f09e2ea (patch) | |
tree | 9fa9019f85181538070a7f5fd24cb4ba0b9714a8 | |
parent | c50f13c672df758b59e026c15b9118f3ed46edc4 (diff) |
ACPICA: Events: Always modify GPE registers under the GPE lock
It is reported that there are pieces of code invoking acpi_ev_finish_gpe()
without holding acpi_gbl_gpe_lock. Since this function will modify GPE
register values, there could be races breaking the register modification
process.
This patch fixes this issue. Lv Zheng.
Reported-by: Joe Liu <joe.liu@apple.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/acpica/evgpe.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c index 81db932b15ee..aa70154cf4fa 100644 --- a/drivers/acpi/acpica/evgpe.c +++ b/drivers/acpi/acpica/evgpe.c | |||
@@ -616,8 +616,11 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context) | |||
616 | static void ACPI_SYSTEM_XFACE acpi_ev_asynch_enable_gpe(void *context) | 616 | static void ACPI_SYSTEM_XFACE acpi_ev_asynch_enable_gpe(void *context) |
617 | { | 617 | { |
618 | struct acpi_gpe_event_info *gpe_event_info = context; | 618 | struct acpi_gpe_event_info *gpe_event_info = context; |
619 | acpi_cpu_flags flags; | ||
619 | 620 | ||
621 | flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); | ||
620 | (void)acpi_ev_finish_gpe(gpe_event_info); | 622 | (void)acpi_ev_finish_gpe(gpe_event_info); |
623 | acpi_os_release_lock(acpi_gbl_gpe_lock, flags); | ||
621 | 624 | ||
622 | ACPI_FREE(gpe_event_info); | 625 | ACPI_FREE(gpe_event_info); |
623 | return; | 626 | return; |