Re: [PATCH] init - fix building bug and potential buffer overflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 15 May 2008 14:15:38 -0700 (PDT)
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> 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.

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

[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux