diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-05-23 12:28:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-23 13:37:45 -0400 |
commit | fccc714b3148ab9741fafc1e90c3876d50df6093 (patch) | |
tree | e536e75faf15f4db8ec653e7303ad9f41cc5c186 /include/linux/perf_counter.h | |
parent | e220d2dcb944c5c488b6855d15ec66d76900514f (diff) |
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>
Diffstat (limited to 'include/linux/perf_counter.h')
-rw-r--r-- | include/linux/perf_counter.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index 23ddd29730f8..4ab8050eb9e8 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
@@ -452,9 +452,6 @@ struct perf_counter { | |||
452 | struct perf_counter_context *ctx; | 452 | struct perf_counter_context *ctx; |
453 | struct file *filp; | 453 | struct file *filp; |
454 | 454 | ||
455 | struct perf_counter *parent; | ||
456 | struct list_head child_list; | ||
457 | |||
458 | /* | 455 | /* |
459 | * These accumulate total time (in nanoseconds) that children | 456 | * These accumulate total time (in nanoseconds) that children |
460 | * counters have been enabled and running, respectively. | 457 | * counters have been enabled and running, respectively. |
@@ -465,7 +462,9 @@ struct perf_counter { | |||
465 | /* | 462 | /* |
466 | * Protect attach/detach and child_list: | 463 | * Protect attach/detach and child_list: |
467 | */ | 464 | */ |
468 | struct mutex mutex; | 465 | struct mutex child_mutex; |
466 | struct list_head child_list; | ||
467 | struct perf_counter *parent; | ||
469 | 468 | ||
470 | int oncpu; | 469 | int oncpu; |
471 | int cpu; | 470 | int cpu; |