Re: [PATCH] kgdb: more barrier in blank weak function
From: Ingo Molnar
Date: Sat Dec 27 2008 - 03:19:16 EST
* Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
> Impact: fix panic possible panic etc
>
> some compiler seems to inline the weak global function if no line in it
> kgdb_post_primary_code(struct pt_regs *regs, int e_vector, int err_code)
> {
> - return;
> + barrier();
> }
> void __weak kgdb_disable_hw_debug(struct pt_regs *regs)
> {
> + barrier();
> }
seems like the barrier() is not enough - the only safe sequence seems to
be to turn it into a function that returns an integer.
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/