Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753133AbZA0GJ7 (ORCPT ); Tue, 27 Jan 2009 01:09:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750717AbZA0GJu (ORCPT ); Tue, 27 Jan 2009 01:09:50 -0500 Received: from bombadil.infradead.org ([18.85.46.34]:57616 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750899AbZA0GJu (ORCPT ); Tue, 27 Jan 2009 01:09:50 -0500 Date: Tue, 27 Jan 2009 01:09:43 -0500 From: Kyle McMartin To: KOSAKI Motohiro Cc: Kyle McMartin , Andrew Morton , Christoph Bartelmus , linux-kernel@vger.kernel.org, Linus Torvalds , Andy Whitcroft Subject: Re: [PATCH] make checkpatch warn about access to current->comm Message-ID: <20090127060943.GD5034@bombadil.infradead.org> References: <20090128144316.D467.KOSAKI.MOTOHIRO@jp.fujitsu.com> <20090127055205.GC5034@bombadil.infradead.org> <20090128145534.D46A.KOSAKI.MOTOHIRO@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090128145534.D46A.KOSAKI.MOTOHIRO@jp.fujitsu.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 904 Lines: 23 On Tue, Jan 27, 2009 at 02:58:51PM +0900, KOSAKI Motohiro wrote: > > On Tue, Jan 27, 2009 at 02:50:18PM +0900, KOSAKI Motohiro wrote: > > > I think "char tcomm[sizeof(current->comm)];" is valid code. > > > if checkpatch.pl don't warn "sizeof(current->comm)", I'm glad. > > > > Awfully interesting way of writing TASK_COMM_LEN :) > > I don't think so awfully. > I think "sizeof(array_val)" is typical code in kernel. > > I agree that we can rewrite s/tcomm[sizeof(current->comm)]/char tcomm[TASK_COMM_LEN]/. > but it's annoyed. > If current->comm was changed to be kmalloc'd this would need to be changed anyway, so why not just do it now? regards, Kyle -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/