Re: [BUG] next-20081216 - WARNING: at kernel/smp.c:333smp_call_function_mask

From: Ingo Molnar
Date: Sat Dec 27 2008 - 04:51:19 EST



* David Howells <dhowells@xxxxxxxxxx> wrote:

> Sam Ravnborg <sam@xxxxxxxxxxxx> wrote:
>
> > I recall David Howells had a similar issue with the bootparamter patch set.
> > The workaround he used was to add a barrier(); call in the weak function
> > to avoid the inline.
>
> Yes I did. Rusty's solution was just to move the default weak functions into
> different files.
>
> Attempting to use the noinline attribute does not work.
>
> Of course, you could just stick the functions into lib/ in separate .c
> files and dispense with the weak attribute altogether.

the weak functions should be close to where the code that uses them is -
not somewhere separate (where no-one will really be aware of their
existence). So either we find a way to avoid such repeat bugs in the
future, or we do away with weak functions altogether and go back to
stone-age #ifdefs ;-)

I think we should get a Sparse check that detects empty void __weak
functions?

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