Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758023Ab1EMV5M (ORCPT ); Fri, 13 May 2011 17:57:12 -0400 Received: from smtp-out.google.com ([74.125.121.67]:5470 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755483Ab1EMV5K (ORCPT ); Fri, 13 May 2011 17:57:10 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; b=qxd3pQTA1/RsWrCYawEHL3ydZSMfnGyDrOAfJ/v8lrtphAs++Zb+Uc2afP2u8TMSJ9 TFxA7xq6o47ZGZ1kVyFQ== Date: Fri, 13 May 2011 14:56:59 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Joe Perches cc: Andy Whitcroft , John Stultz , LKML , "Ted Ts'o" , KOSAKI Motohiro , Dave Hansen , Andrew Morton , linux-mm@kvack.org Subject: Re: [PATCH 2/3] printk: Add %ptc to safely print a task's comm In-Reply-To: <1305239342.6124.77.camel@Joe-Laptop> Message-ID: References: <1305073386-4810-1-git-send-email-john.stultz@linaro.org> <1305073386-4810-3-git-send-email-john.stultz@linaro.org> <1305075090.19586.189.camel@Joe-Laptop> <1305076246.2939.67.camel@work-vm> <1305076850.19586.196.camel@Joe-Laptop> <1305239342.6124.77.camel@Joe-Laptop> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1209 Lines: 24 On Thu, 12 May 2011, Joe Perches wrote: > > > > Although I'm not sure if there's precedent for a %p value that didn't > > > > take a argument. Thoughts on that? Anyone else have an opinion here? > > > The uses of %ptc must add an argument or else gcc will complain. > > > I suggest you just ignore the argument value and use current. > > That doesn't make any sense, why would you needlessly restrict this to > > current when accesses to other threads' ->comm needs to be protected in > > the same way? I'd like to use this in the oom killer and try to get rid > > of taking task_lock() for every thread group leader in the tasklist dump. > > I suppose another view is coder stuffed up, let them suffer... > > At some point, gcc may let us extend printf argument type > verification so it may not be a continuing problem. > I don't understand your respose, could you answer my question? Printing the command of threads other than current isn't special. -- 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/