aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-07-22 05:13:50 -0400
committerPeter Zijlstra <a.p.zijlstra@chello.nl>2009-07-22 12:05:55 -0400
commit573402db02746179b3f95f83a11a787501f52d0a (patch)
tree111fb9d0b65d31cb9308a84164f111874d2522ae /kernel
parentc9f73a3dd27e03411f18a58c0814d51392d2b17a (diff)
perf_counter: Plug more stack leaks
Per example of Arjan's patch, I went through and found a few more. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/perf_counter.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index ff854fd89a81..e1d6a3aa1333 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -2897,8 +2897,11 @@ void perf_counter_fork(struct task_struct *task)
2897 .event = { 2897 .event = {
2898 .header = { 2898 .header = {
2899 .type = PERF_EVENT_FORK, 2899 .type = PERF_EVENT_FORK,
2900 .misc = 0,
2900 .size = sizeof(fork_event.event), 2901 .size = sizeof(fork_event.event),
2901 }, 2902 },
2903 /* .pid */
2904 /* .ppid */
2902 }, 2905 },
2903 }; 2906 };
2904 2907
@@ -3008,8 +3011,16 @@ void perf_counter_comm(struct task_struct *task)
3008 3011
3009 comm_event = (struct perf_comm_event){ 3012 comm_event = (struct perf_comm_event){
3010 .task = task, 3013 .task = task,
3014 /* .comm */
3015 /* .comm_size */
3011 .event = { 3016 .event = {
3012 .header = { .type = PERF_EVENT_COMM, }, 3017 .header = {
3018 .type = PERF_EVENT_COMM,
3019 .misc = 0,
3020 /* .size */
3021 },
3022 /* .pid */
3023 /* .tid */
3013 }, 3024 },
3014 }; 3025 };
3015 3026
@@ -3160,8 +3171,16 @@ void __perf_counter_mmap(struct vm_area_struct *vma)
3160 3171
3161 mmap_event = (struct perf_mmap_event){ 3172 mmap_event = (struct perf_mmap_event){
3162 .vma = vma, 3173 .vma = vma,
3174 /* .file_name */
3175 /* .file_size */
3163 .event = { 3176 .event = {
3164 .header = { .type = PERF_EVENT_MMAP, }, 3177 .header = {
3178 .type = PERF_EVENT_MMAP,
3179 .misc = 0,
3180 /* .size */
3181 },
3182 /* .pid */
3183 /* .tid */
3165 .start = vma->vm_start, 3184 .start = vma->vm_start,
3166 .len = vma->vm_end - vma->vm_start, 3185 .len = vma->vm_end - vma->vm_start,
3167 .pgoff = vma->vm_pgoff, 3186 .pgoff = vma->vm_pgoff,