projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb3f0b5
)
perfcounters: fix refcounting bug
author
Mike Galbraith
<efault@gmx.de>
Thu, 29 Jan 2009 13:06:52 +0000
(14:06 +0100)
committer
Ingo Molnar
<mingo@elte.hu>
Thu, 29 Jan 2009 13:25:23 +0000
(14:25 +0100)
don't kfree in use counters.
Running...
while true; do perfstat -e 1 -c true; done
...on all cores for a while doesn't seem to be eating ram, and my oops
is gone.
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_counter.c
patch
|
blob
|
history
diff --git
a/kernel/perf_counter.c
b/kernel/perf_counter.c
index
1ac18da
..
f27a7e9
100644
(file)
--- a/
kernel/perf_counter.c
+++ b/
kernel/perf_counter.c
@@
-1934,7
+1934,8
@@
__perf_counter_exit_task(struct task_struct *child,
}
}
- kfree(child_counter);
+ if (!child_counter->filp || !atomic_long_read(&child_counter->filp->f_count))
+ kfree(child_counter);
}
/*