From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: Re: [PATCH] export kernel call set_task_comm() Date: Fri, 1 Jun 2012 02:24:45 +0100 Message-ID: <20120601012445.GF30000@ZenIV.linux.org.uk> References: <201205311516140150468@gmail.com> <201206010911269377891@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel To: majianpeng Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:59377 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933290Ab2FABYs (ORCPT ); Thu, 31 May 2012 21:24:48 -0400 Content-Disposition: inline In-Reply-To: <201206010911269377891@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jun 01, 2012 at 09:11:32AM +0800, majianpeng wrote: > On Thu, 31 May 2012 17:00:54 +0100 , viro wrote: > >On Thu, May 31, 2012 at 03:16:18PM +0800, majianpeng wrote: > >> In Commit 7d74f492e4dd0034a61458eb80f70b1d2862ed07,author said: > >> "This allows drivers who call this function to be compiled modularly. > >> Otherwise, a driver who is interested in this type of functionality > >> has to implement their own get_task_comm() call, causing code > >> duplication in the Linux source tree." > >> > >> But author did not say about set_task_comm().At present,I used it but > >> compiled error.To the same purpose, it should export. > > >Are you doing that to preexisting process? Or just to a kernel thread > >you are creating? In the latter case, you really ought to use > >kthread_create() instead of bare-metal kernel_thread()... > > Yes, I am doing that to preexisting process and in module.So I think it should export. Why is that module playing with ->comm[] of process it hadn't spawned? Note that _reading_ ->comm[] has fairly mundane uses - debugging printks and all such. Changing it, OTOH... Details, please; "my module calls that, so it should be exported" is not enough.