lkml.org 
[lkml]   [2009]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] make checkpatch warn about access to current->comm
On Tue, Jan 27, 2009 at 07:45:41AM -0800, Linus Torvalds wrote:
>
>
> On Tue, 27 Jan 2009, Kyle McMartin wrote:
> >
> > Suggest using the get_task_comm accessor versus direct access to
> > current->comm.
>
> I think "current->comm" is fine, and not racy.
>
> It only gets racy when you ask for the name of _another_ task.
>
> And quite frankly, I don't think anybody but /proc does that anyway. I
> think this whole "get_task_comm()" thing is overrated. Most people are
> better off doing just "current->comm".
>

Sure, fine by me. I'd forgotten that prctl doesn't have a `pid' argument
to change another tasks comm.

regards, Kyle


\
 
 \ /
  Last update: 2009-01-27 17:01    [W:0.393 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site