Re: [PATCH] export get_task_comm()

From: KOSAKI Motohiro
Date: Tue Jan 27 2009 - 05:16:12 EST


> > > It's worth a checkpatch rule, I guess: "direct access to
> > > task_struct.comm is racy - use get_task_comm()".
> >
> > And majority of usages is some debugging printk where nobody cares if ->comm
> > corrupted.
> >
> > Changelog says is useful for debugging. That's right, tsk->comm is useful
> > for debugging, not allocating temporary buffer + get_task_comm().
> >
> > Some ->comm usages are for kernel threads which never change it, for starters.
> >
> > current->comm is always safe, because, current is not executing prctl(2)!
>
> That's a good point.
>
> > I'd say nothing should be done and, heavens forbid, adding this to checkpatch.pl.
>
> hm, yeah, OK, I'll drop it.

Oh, I have to agree Alexey because he is always right ;)




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/