[PATCH 2/3] comm: timerstats: Protect task->comm access by using get_task_comm()
From: John Stultz
Date: Thu Apr 28 2011 - 00:03:49 EST
Converts the timerstats code to use get_task_comm for protected
comm access.
CC: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
CC: David Rientjes <rientjes@xxxxxxxxxx>
CC: Dave Hansen <dave@xxxxxxxxxxxxxxxxxx>
CC: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
CC: linux-mm@xxxxxxxxx
Signed-off-by: John Stultz <john.stultz@xxxxxxxxxx>
---
kernel/timer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/timer.c b/kernel/timer.c
index fd61986..85308fb 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -379,7 +379,7 @@ void __timer_stats_timer_set_start_info(struct timer_list *timer, void *addr)
return;
timer->start_site = addr;
- memcpy(timer->start_comm, current->comm, TASK_COMM_LEN);
+ get_task_comm(timer->start_comm, current);
timer->start_pid = current->pid;
}
--
1.7.3.2.146.gca209
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/