Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753577AbZJVArK (ORCPT ); Wed, 21 Oct 2009 20:47:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753419AbZJVArJ (ORCPT ); Wed, 21 Oct 2009 20:47:09 -0400 Received: from casper.infradead.org ([85.118.1.10]:33215 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753354AbZJVArJ (ORCPT ); Wed, 21 Oct 2009 20:47:09 -0400 Date: Wed, 21 Oct 2009 17:48:04 -0700 From: Arjan van de Ven To: john stultz Cc: Andi Kleen , lkml , Mike Fulton , Sean Foley , Darren Hart Subject: Re: [RFC][PATCH] Add prctl to set sibling thread names Message-ID: <20091021174804.3885db37@infradead.org> In-Reply-To: <1256167297.4768.14.camel@localhost.localdomain> References: <1256167297.4768.14.camel@localhost.localdomain> Organization: Intel X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.6; i586-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1080 Lines: 30 On Wed, 21 Oct 2009 16:21:37 -0700 john stultz wrote: > > Taking a very raw attempt at this, I scratched out the following > simple implementation. I'd appreciate any review or suggestions for > improvements. I'm not at all certain the passing of the thread pid_t > through the unsigned long is valid, for instance, or if > same_thread_group() is the right check to make sure we only change > siblings and not tid from other processes. So any advice on better > approaches would be great. > > + return -EINVAL; > + > + set_task_comm(tsk, comm); you're pretty much the first now who touches ->comm from not-the-thread-itself.... are you sure that is safe? -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org -- 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/