[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1395767794-5012-35-git-send-email-kamal@canonical.com>
Date: Tue, 25 Mar 2014 10:15:47 -0700
From: Kamal Mostafa <kamal@...onical.com>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
kernel-team@...ts.ubuntu.com
Cc: Tomasz Nowicki <tomasz.nowicki@...aro.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Kamal Mostafa <kamal@...onical.com>
Subject: [PATCH 3.8 34/81] ACPI / PCI: Fix memory leak in acpi_pci_irq_enable()
3.8.13.20 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomasz Nowicki <tomasz.nowicki@...aro.org>
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@...aro.org>
[rjw: Subject and changelog]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Signed-off-by: Kamal Mostafa <kamal@...onical.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists