Messages in this thread | | | Date | Thu, 15 May 2008 14:45:54 -0700 | From | Andrew Morton <> | Subject | Re: [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.
| |