From patchwork Thu Apr 28 04:03:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 1206 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:50:09 -0000 Delivered-To: patches@linaro.org Received: by 10.224.2.73 with SMTP id 9cs133605qai; Wed, 27 Apr 2011 21:03:44 -0700 (PDT) Received: by 10.52.66.104 with SMTP id e8mr2408401vdt.132.1303963423955; Wed, 27 Apr 2011 21:03:43 -0700 (PDT) Received: from e1.ny.us.ibm.com (e1.ny.us.ibm.com [32.97.182.141]) by mx.google.com with ESMTPS id cj13si1998592vdb.115.2011.04.27.21.03.43 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Apr 2011 21:03:43 -0700 (PDT) Received-SPF: pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.141 as permitted sender) client-ip=32.97.182.141; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.141 as permitted sender) smtp.mail=jstultz@us.ibm.com Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by e1.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p3S3qtf6009079; Wed, 27 Apr 2011 23:52:55 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p3S43fUL1298600; Thu, 28 Apr 2011 00:03:41 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p3S03oAE032704; Wed, 27 Apr 2011 21:03:51 -0300 Received: from kernel.beaverton.ibm.com (kernel.beaverton.ibm.com [9.47.67.96]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p3S03oNT032693; Wed, 27 Apr 2011 21:03:50 -0300 Received: by kernel.beaverton.ibm.com (Postfix, from userid 1056) id 42CD31E750F; Wed, 27 Apr 2011 21:03:40 -0700 (PDT) From: John Stultz To: LKML Cc: John Stultz , KOSAKI Motohiro , David Rientjes , Dave Hansen , Andrew Morton , linux-mm@kvack.org Subject: [PATCH 2/3] comm: timerstats: Protect task->comm access by using get_task_comm() Date: Wed, 27 Apr 2011 21:03:30 -0700 Message-Id: <1303963411-2064-3-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.3.2.146.gca209 In-Reply-To: <1303963411-2064-1-git-send-email-john.stultz@linaro.org> References: <1303963411-2064-1-git-send-email-john.stultz@linaro.org> Converts the timerstats code to use get_task_comm for protected comm access. CC: KOSAKI Motohiro CC: David Rientjes CC: Dave Hansen CC: Andrew Morton CC: linux-mm@kvack.org Signed-off-by: John Stultz --- 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; }