From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932714Ab1EMLMR (ORCPT ); Fri, 13 May 2011 07:12:17 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:37047 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932213Ab1EMLMQ (ORCPT ); Fri, 13 May 2011 07:12:16 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Message-ID: <4DCD1271.3070808@jp.fujitsu.com> Date: Fri, 13 May 2011 20:13:53 +0900 From: KOSAKI Motohiro User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: John Stultz CC: LKML , "Ted Ts'o" , David Rientjes , Dave Hansen , Andrew Morton , linux-mm@kvack.org Subject: Re: [PATCH 3/3] checkpatch.pl: Add check for current->comm references References: <1305241371-25276-1-git-send-email-john.stultz@linaro.org> <1305241371-25276-4-git-send-email-john.stultz@linaro.org> In-Reply-To: <1305241371-25276-4-git-send-email-john.stultz@linaro.org> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > scripts/checkpatch.pl | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index d867081..9d2eab5 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -2868,6 +2868,10 @@ sub process { > WARN("usage of NR_CPUS is often wrong - consider using cpu_possible(), num_possible_cpus(), for_each_possible_cpu(), etc\n" . $herecurr); > } > > +# check for current->comm usage > + if ($line =~ /current->comm/) { > + WARN("comm access needs to be protected. Use get_task_comm, or printk's \%ptc formatting.\n" . $herecurr); I think we should convert all of task->comm usage. not only current. At least, you plan to remove task_lock() from %ptc patch later. thanks.