From: Stefan Wahren <stefan.wahren@i2se.com>
To: Mark Rutland <mark.rutland@arm.com>, Will Deacon <will.deacon@arm.com>
Cc: Eric Anholt <eric@anholt.net>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Stefan Wahren <stefan.wahren@i2se.com>
Subject: [PATCH 1/2] drivers/perf: arm_pmu: Fix leak in error path
Date: Sat, 27 Aug 2016 16:19:49 +0000 [thread overview]
Message-ID: <1472314790-4268-1-git-send-email-stefan.wahren@i2se.com> (raw)
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")
---
drivers/perf/arm_pmu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c
index c494613..1b48bf0 100644
--- a/drivers/perf/arm_pmu.c
+++ b/drivers/perf/arm_pmu.c
@@ -925,6 +925,7 @@ static int of_pmu_irq_cfg(struct arm_pmu *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;
}
--
1.7.9.5
next reply other threads:[~2016-08-27 16:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-27 16:19 Stefan Wahren [this message]
2016-08-27 16:19 ` [PATCH 2/2] drivers/perf: arm_pmu: Fix NULL pointer dereference during probe Stefan Wahren
2016-08-30 11:27 ` Will Deacon
2016-09-01 2:17 ` Kevin Hilman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1472314790-4268-1-git-send-email-stefan.wahren@i2se.com \
--to=stefan.wahren@i2se.com \
--cc=eric@anholt.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®