Re: [PATCH] export get_task_comm()

From: Linus Torvalds
Date: Tue Jan 27 2009 - 10:42:28 EST




On Mon, 26 Jan 2009, Andrew Morton wrote:
> >
> > task::comm is good debugging information and driver developer want to
> > use this information easily.
>
> Ho hum, I suppose so. I redid the changelog a bit:
>
> task_struct.comm[] is useful for debugging and driver developers
> want to use this information easily. Direct access to
> task_struct.comm[] is a bit racy, so export the official accessor.

The biggest issue I have with this is that the whole "get_task_comm()"
interface is not very good for random users - it inherently depends on the
result buffer being at least sizeof(tsk->comm).

If we export it to random routines, I get the feeling that we should pass
in the size of the result buffer, so that they don't have to know about
this requirement.

Linus
--
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/