From: Rusty Russell Date: Tue, 29 Jan 2008 22:13:17 +0000 (-0500) Subject: module: Don't report discarded init pages as kernel text. X-Git-Tag: v2.6.25-rc1~1165^2~7 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a2da4052f1df6bc77749f84496fe731ab8b458f7;p=linux-2.6-omap-h63xx.git module: Don't report discarded init pages as kernel text. Current code could cause a bug in symbol_put_addr() if an arch used kmalloc module text: we might think the symbol belongs to the core kernel. The downside is that this might make backtraces through (discarded) init functions harder to read on some archs, but we already have that issue for modules and noone has complained. Signed-off-by: Rusty Russell --- diff --git a/kernel/extable.c b/kernel/extable.c index 7fe26285531..a26cb2e1702 100644 --- a/kernel/extable.c +++ b/kernel/extable.c @@ -46,7 +46,8 @@ int core_kernel_text(unsigned long addr) addr <= (unsigned long)_etext) return 1; - if (addr >= (unsigned long)_sinittext && + if (system_state == SYSTEM_BOOTING && + addr >= (unsigned long)_sinittext && addr <= (unsigned long)_einittext) return 1; return 0;