提交 7dd88219 编写于 作者: L Lv Zheng 提交者: Rafael J. Wysocki

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: NJoe Liu <joe.liu@apple.com>
Signed-off-by: NLv Zheng <lv.zheng@intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 c50f13c6
......@@ -616,8 +616,11 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
static void ACPI_SYSTEM_XFACE acpi_ev_asynch_enable_gpe(void *context)
{
struct acpi_gpe_event_info *gpe_event_info = context;
acpi_cpu_flags flags;
flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
(void)acpi_ev_finish_gpe(gpe_event_info);
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
ACPI_FREE(gpe_event_info);
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册