projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad0f7cf
)
oprofile, ARM: Release resources on failure
author
Robert Richter
<
[email protected]
>
Wed, 29 Sep 2010 14:52:25 +0000
(16:52 +0200)
committer
Robert Richter
<
[email protected]
>
Mon, 11 Oct 2010 17:27:10 +0000
(19:27 +0200)
This patch fixes a resource leak on failure, where the
oprofilefs and some counters may not released properly.
Signed-off-by: Robert Richter <
[email protected]
>
Acked-by: Will Deacon <
[email protected]
>
Cc:
[email protected]
Cc: <
[email protected]
> # .35.x
LKML-Reference: <
20100929145225
[email protected]
>
Signed-off-by: Ingo Molnar <
[email protected]
>
drivers/oprofile/oprofile_perf.c
patch
|
blob
|
history
diff --git
a/drivers/oprofile/oprofile_perf.c
b/drivers/oprofile/oprofile_perf.c
index ebb40cb874742731a7bb7935e102dbc4724b0fc3..f3d3df229a43896dc9a279b4b5f51de69d7d831e 100644
(file)
--- 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;