Commit 30a39e0e authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'stacktrace-for-linus' of...

Merge branch 'stacktrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'stacktrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  symbols, stacktrace: look up init symbols after module symbols
parents c7edad5f 4a44bac1
...@@ -41,6 +41,14 @@ const struct exception_table_entry *search_exception_tables(unsigned long addr) ...@@ -41,6 +41,14 @@ const struct exception_table_entry *search_exception_tables(unsigned long addr)
return e; return e;
} }
static inline int init_kernel_text(unsigned long addr)
{
if (addr >= (unsigned long)_sinittext &&
addr <= (unsigned long)_einittext)
return 1;
return 0;
}
__notrace_funcgraph int core_kernel_text(unsigned long addr) __notrace_funcgraph int core_kernel_text(unsigned long addr)
{ {
if (addr >= (unsigned long)_stext && if (addr >= (unsigned long)_stext &&
...@@ -48,8 +56,7 @@ __notrace_funcgraph int core_kernel_text(unsigned long addr) ...@@ -48,8 +56,7 @@ __notrace_funcgraph int core_kernel_text(unsigned long addr)
return 1; return 1;
if (system_state == SYSTEM_BOOTING && if (system_state == SYSTEM_BOOTING &&
addr >= (unsigned long)_sinittext && init_kernel_text(addr))
addr <= (unsigned long)_einittext)
return 1; return 1;
return 0; return 0;
} }
...@@ -58,7 +65,19 @@ __notrace_funcgraph int __kernel_text_address(unsigned long addr) ...@@ -58,7 +65,19 @@ __notrace_funcgraph int __kernel_text_address(unsigned long addr)
{ {
if (core_kernel_text(addr)) if (core_kernel_text(addr))
return 1; return 1;
return __module_text_address(addr) != NULL; if (__module_text_address(addr))
return 1;
/*
* There might be init symbols in saved stacktraces.
* Give those symbols a chance to be printed in
* backtraces (such as lockdep traces).
*
* Since we are after the module-symbols check, there's
* no danger of address overlap:
*/
if (init_kernel_text(addr))
return 1;
return 0;
} }
int kernel_text_address(unsigned long addr) int kernel_text_address(unsigned long addr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment