aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/perf_counter.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-04-09 03:48:22 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-09 03:48:22 -0400
commit888fcee066a2f4abd0d0bc9418c0535f9b01e6e5 (patch)
tree76076a3c627d1cf76cc8109329a4882879cddfcc /kernel/perf_counter.c
parentca8f2d7f019a8547f39ddb9ed0144932f12807f2 (diff)
perf_counter: fix off task->comm by one
strlen() does not include the \0. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_counter.c')
-rw-r--r--kernel/perf_counter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index 321c57e3556f..b07195bbd228 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -1989,7 +1989,7 @@ static void perf_counter_comm_event(struct perf_comm_event *comm_event)
1989 unsigned int size; 1989 unsigned int size;
1990 char *comm = comm_event->task->comm; 1990 char *comm = comm_event->task->comm;
1991 1991
1992 size = ALIGN(strlen(comm), sizeof(u64)); 1992 size = ALIGN(strlen(comm)+1, sizeof(u64));
1993 1993
1994 comm_event->comm = comm; 1994 comm_event->comm = comm;
1995 comm_event->comm_size = size; 1995 comm_event->comm_size = size;
@@ -2109,7 +2109,7 @@ static void perf_counter_mmap_event(struct perf_mmap_event *mmap_event)
2109 } 2109 }
2110 2110
2111got_name: 2111got_name:
2112 size = ALIGN(strlen(name), sizeof(u64)); 2112 size = ALIGN(strlen(name)+1, sizeof(u64));
2113 2113
2114 mmap_event->file_name = name; 2114 mmap_event->file_name = name;
2115 mmap_event->file_size = size; 2115 mmap_event->file_size = size;