lkml.org 
[lkml]   [2009]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] use the TASK_COMM_LEN macro instead of sizeof(tsk->comm)
On Mon, Jun 15, 2009 at 12:14:10AM +0100, Alan Cox wrote:
> On Sun, 14 Jun 2009 18:57:48 +0200
> Evgeni Golov <sargentd@die-welt.net> wrote:
>
> > sizeof(tsk->comm) == TASK_COMM_LEN, always, so why not use it?
>
> Because if the size ever changes the existing code will remain correct
> and your changes will become a dangerous buffer overrun ?

But shouldn't TASK_COMM_LEN change then too?
Just wondering, in the end it's a cosmetic cange, but looking at the
code, we rely on TASK_COMM_LEN in other places often enough to break
something when a task->comm is not TASK_COMM_LEM big.

Regards
Evgeni


\
 
 \ /
  Last update: 2009-06-15 08:09    [W:0.045 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site