[3.8.y.z extended stable] Patch "ACPI / PCI: Fix memory leak in acpi_pci_irq_enable()" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Thu Mar 20 15:54:40 UTC 2014


This is a note to let you know that I have just added a patch titled

    ACPI / PCI: Fix memory leak in acpi_pci_irq_enable()

to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue

This patch is scheduled to be released in version 3.8.13.20.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.8.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 6b1379b06c7274ac52a0e9ec9be39c9527d8c4df Mon Sep 17 00:00:00 2001
From: Tomasz Nowicki <tomasz.nowicki at linaro.org>
Date: Mon, 10 Feb 2014 14:00:11 +0100
Subject: ACPI / PCI: Fix memory leak in acpi_pci_irq_enable()

commit b685f3b1744061aa9ad822548ba9c674de5be7c6 upstream.

acpi_pci_link_allocate_irq() can return negative gsi even if
entry != NULL.  For that case we have a memory leak, so free
entry before returning from acpi_pci_irq_enable() for gsi < 0.

Signed-off-by: Tomasz Nowicki <tomasz.nowicki at linaro.org>
[rjw: Subject and changelog]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki at intel.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 drivers/acpi/pci_irq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index 68a921d..bee8d6d 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -470,6 +470,8 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
 			dev_warn(&dev->dev, "PCI INT %c: no GSI\n",
 				 pin_name(pin));
 		}
+
+		kfree(entry);
 		return 0;
 	}

--
1.8.3.2





More information about the kernel-team mailing list