From: tip-bot for Robert Richter <robert.richter@amd.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
robert.richter@amd.com, will.deacon@arm.com, tglx@linutronix.de,
mingo@elte.hu
Subject: [tip:perf/core] oprofile, ARM: Release resources on failure
Date: Sat, 16 Oct 2010 16:32:19 GMT [thread overview]
Message-ID: <tip-81771974ae49bf79aab60c42eac7a6d730a9ef2b@git.kernel.org> (raw)
In-Reply-To: <20100929145225.GJ13563@erda.amd.com>
Commit-ID: 81771974ae49bf79aab60c42eac7a6d730a9ef2b
Gitweb: http://git.kernel.org/tip/81771974ae49bf79aab60c42eac7a6d730a9ef2b
Author: Robert Richter <robert.richter@amd.com>
AuthorDate: Wed, 29 Sep 2010 16:52:25 +0200
Committer: Robert Richter <robert.richter@amd.com>
CommitDate: Mon, 11 Oct 2010 19:27:10 +0200
oprofile, ARM: Release resources on failure
This patch fixes a resource leak on failure, where the
oprofilefs and some counters may not released properly.
Signed-off-by: Robert Richter <robert.richter@amd.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: <stable@kernel.org> # .35.x
LKML-Reference: <20100929145225.GJ13563@erda.amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
drivers/oprofile/oprofile_perf.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/oprofile/oprofile_perf.c b/drivers/oprofile/oprofile_perf.c
index ebb40cb..f3d3df2 100644
--- a/drivers/oprofile/oprofile_perf.c
+++ b/drivers/oprofile/oprofile_perf.c
@@ -84,6 +84,7 @@ static int op_create_counter(int cpu, int event)
if (IS_ERR(pevent)) {
ret = PTR_ERR(pevent);
} else if (pevent->state != PERF_EVENT_STATE_ACTIVE) {
+ perf_event_release_kernel(pevent);
pr_warning("oprofile: failed to enable event %d "
"on CPU %d\n", event, cpu);
ret = -EBUSY;
prev parent reply other threads:[~2010-10-16 16:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-29 14:52 [PATCH] oprofile, arm: proper release resources on failure Robert Richter
2010-09-29 15:39 ` Will Deacon
2010-09-29 16:50 ` Robert Richter
2010-09-29 16:59 ` Robert Richter
2010-09-29 17:32 ` Will Deacon
2010-09-29 17:39 ` Robert Richter
2010-10-04 20:24 ` [tip:perf/urgent] oprofile, ARM: Release " tip-bot for Robert Richter
2010-10-16 16:32 ` tip-bot for Robert Richter [this message]
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=tip-81771974ae49bf79aab60c42eac7a6d730a9ef2b@git.kernel.org \
--to=robert.richter@amd.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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