From 383d7a11c9989205db44c7f1be339e5097062f03 Mon Sep 17 00:00:00 2001 From: "donald.d.dugger@intel.com" Date: Fri, 17 Oct 2008 07:49:50 -0700 Subject: ACPI: Fix possible null ptr dereference Code in `pci_link.c' is calling the internal routine `acpi_ut_evaluate_object' which is dangerous given that it is passing a NULL pointer when it should be passing a pointer to a real object. The patch corrects the issue by having the code call the external routine `acpi_evaluate_object', which correctly handles a NULL pointer. Signed-off-by: Don Dugger Signed-off-by: Len Brown --- drivers/acpi/pci_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index cf47805a744..65bf4fa5963 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c @@ -709,7 +709,7 @@ int acpi_pci_link_free_irq(acpi_handle handle) acpi_device_bid(link->device))); if (link->refcnt == 0) { - acpi_ut_evaluate_object(link->device->handle, "_DIS", 0, NULL); + acpi_evaluate_object(link->device->handle, "_DIS", NULL, NULL); } mutex_unlock(&acpi_link_lock); return (link->irq.active); @@ -773,7 +773,7 @@ static int acpi_pci_link_add(struct acpi_device *device) end: /* disable all links -- to be activated on use */ - acpi_ut_evaluate_object(device->handle, "_DIS", 0, NULL); + acpi_evaluate_object(device->handle, "_DIS", NULL, NULL); mutex_unlock(&acpi_link_lock); if (result) -- cgit v1.2.3-70-g09d2