lkml.org 
[lkml]   [2008]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] init - fix building bug and potential buffer overflow
On Thu, 15 May 2008 14:15:38 -0700 (PDT)
Linus Torvalds <torvalds@linux-foundation.org> wrote:

>
>
> On Thu, 15 May 2008, Andrew Morton wrote:
> >
> > (yeah, I normally parenthesise sizeof too, but this provided 80-col
> > salvation)
>
> Why?

this, basically:

> init/main.c | 78 +++++++++++++++++++++++++++++++----------------------------
> 1 files changed, 41 insertions(+), 37 deletions(-)

the dont-mix-bugfixes-and-cleanups mantra.

The patch looks good to me and compiles cleanly on various architectures.

> Talking about cleanups, why the *hell* does print_fn_descriptor_symbol()
> take an "unsigned long", when every single user would want to give it a
> pointer?

Yes, we make that mistake fairly regularly (looks at timer_list.data).
We start out not being sure whether most callers will pass in a ulong
or a pointer and guess wrongly.

> Would somebody please want to move that cast into the macro (or better
> yet, make it an inline function that takes a 'void *'), and remove all the
> casts from the callers?

Would be nice.



\
 
 \ /
  Last update: 2008-05-15 23:49    [W:0.071 / U:0.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site