From: Lv Zheng Date: Thu, 5 Feb 2015 07:20:14 +0000 (+0800) Subject: ACPICA: Events: Cleanup of resetting the GPE handler to NULL before removing X-Git-Tag: firefly_0821_release~176^2~2381^2~11^2~8 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c539251e7c1537c8b3dcaa1c89f5393d04996013;p=firefly-linux-kernel-4.4.55.git ACPICA: Events: Cleanup of resetting the GPE handler to NULL before removing ACPICA commit b2b18bb38045404e253f10787b8a4ae6e94cdee6 This patch prevents acpi_remove_gpe_handler() from leaking the stale gpe_event_info->Dispatch.Handler to the caller to avoid possible NULL pointer references. Lv Zheng. Link: https://github.com/acpica/acpica/commit/b2b18bb3 Signed-off-by: Lv Zheng Signed-off-by: David E. Box Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c index 55a58f3ec8df..b6b0c2341d29 100644 --- a/drivers/acpi/acpica/evxface.c +++ b/drivers/acpi/acpica/evxface.c @@ -896,6 +896,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, /* Remove the handler */ handler = gpe_event_info->dispatch.handler; + gpe_event_info->dispatch.handler = NULL; /* Restore Method node (if any), set dispatch flags */