Re: the creation of boot_cpu_init() is wrong and accessinguninitialised data

From: James Bottomley
Date: Wed Jun 28 2006 - 19:08:51 EST


On Tue, 2006-06-27 at 19:57 -0700, Andrew Morton wrote:
> I didn't mark it inline.
>
> If the compiler chose to inline it then that would be rather dumb of
> it,
> given that it had the weak attribute. But yes, paranoia says we
> should be
> tagging this noinline too.

Sorry, I was thinking static means "I may inline". And indeed, my
compiler says this:

init/main.c: In function 'smp_init':
init/main.c: At top level:
init/main.c:457: error: weak declaration of 'smp_setup_processor_id' must be public
init/main.c:457: error: static declaration of 'smp_setup_processor_id' follows non-static declaration
include/linux/smp.h:128: error: previous declaration of 'smp_setup_processor_id' was here

Making it non-static in init/main.c fixes this

I'm still compiling, so might have the results later this evening.

James



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