From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967018AbbBEHUi (ORCPT ); Thu, 5 Feb 2015 02:20:38 -0500 Received: from mga14.intel.com ([192.55.52.115]:20055 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966829AbbBEHU3 (ORCPT ); Thu, 5 Feb 2015 02:20:29 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,522,1418112000"; d="scan'208";a="681205599" From: Lv Zheng To: "Rafael J. Wysocki" , Len Brown Cc: Lv Zheng , Lv Zheng , , linux-acpi@vger.kernel.org, "David E. Box" , Bob Moore Subject: [PATCH 05/10] ACPICA: Events: Cleanup of resetting the GPE handler to NULL before removing. Date: Thu, 5 Feb 2015 15:20:14 +0800 Message-Id: <03498d3612bdc7d67feb473f89de2beb88f65944.1423119574.git.lv.zheng@intel.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Rafael J. Wysocki Signed-off-by: David E. Box Signed-off-by: Bob Moore --- drivers/acpi/acpica/evxface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c index 55a58f3..b6b0c23 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 */ -- 1.7.10