Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1496249

[PATCH 4.7 020/141] drivers/perf: arm_pmu: Fix leak in error path

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.7 020/141] drivers/perf: arm_pmu: Fix leak in error path
Date 2016-10-06 10:40 +0200
Message-ID <spcnF-64l-57@gated-at.bofh.it> (permalink)
References <spcnD-64l-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


4.7-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Stefan Wahren <stefan.wahren@i2se.com>

commit 753246840d012ae34ea80a1d40bc1546c62fb957 upstream.

In case of a IRQ type mismatch in of_pmu_irq_cfg() the
device node for interrupt affinity isn't freed. So fix this
issue by calling of_node_put().

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Fixes: fa8ad7889d83 ("arm: perf: factor arm_pmu core out to drivers")
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/perf/arm_pmu.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/perf/arm_pmu.c
+++ b/drivers/perf/arm_pmu.c
@@ -921,6 +921,7 @@ static int of_pmu_irq_cfg(struct arm_pmu
 			if (i > 0 && spi != using_spi) {
 				pr_err("PPI/SPI IRQ type mismatch for %s!\n",
 					dn->name);
+				of_node_put(dn);
 				kfree(irqs);
 				return -EINVAL;
 			}

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 4.7 020/141] drivers/perf: arm_pmu: Fix leak in error path Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-10-06 10:40 +0200

csiph-web