perf_counter: Sanitize counter->mutex
s/counter->mutex/counter->child_mutex/ and make sure its only used to protect child_list. The usage in __perf_counter_exit_task() doesn't appear to be problematic since ctx->mutex also covers anything related to fd tear-down. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: John Kacur <jkacur@redhat.com> LKML-Reference: <20090523163012.533186528@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:

committed by
Ingo Molnar

parent
e220d2dcb9
commit
fccc714b31
@@ -452,9 +452,6 @@ struct perf_counter {
|
||||
struct perf_counter_context *ctx;
|
||||
struct file *filp;
|
||||
|
||||
struct perf_counter *parent;
|
||||
struct list_head child_list;
|
||||
|
||||
/*
|
||||
* These accumulate total time (in nanoseconds) that children
|
||||
* counters have been enabled and running, respectively.
|
||||
@@ -465,7 +462,9 @@ struct perf_counter {
|
||||
/*
|
||||
* Protect attach/detach and child_list:
|
||||
*/
|
||||
struct mutex mutex;
|
||||
struct mutex child_mutex;
|
||||
struct list_head child_list;
|
||||
struct perf_counter *parent;
|
||||
|
||||
int oncpu;
|
||||
int cpu;
|
||||
|
Reference in New Issue
Block a user