summaryrefslogtreecommitdiff
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2004-06-26 20:55:19 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-06-26 20:55:19 -0700
commit969eb7b840c13a73190d98a608b8fec50dc31971 (patch)
treeb0af0354e990cb82bfa1e9ceeaf46ca9be9567e7 /include/linux/kernel.h
parent12d9986b3c8acda935906514c593ea806e1736bd (diff)
[PATCH] Fix race between CONFIG_DEBUG_SLABALLOC and modules
store_stackinfo() does an unlocked module list walk during normal runtime which opens up a race with the module load/unload code. This can be triggered by simply unloading and loading a module in a loop with CONFIG_DEBUG_PAGEALLOC resulting in store_stackinfo() tripping over bad list pointers. kernel_text_address doesn't take any locks, because during an OOPS we don't want to deadlock. Rename that to __kernel_text_address, and make kernel_text_address take the lock. Signed-off-by: Zwane Mwaikambo <zwane@fsmlabs.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (modified) Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index d6ed9b926c6f..c4c862629d84 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -93,6 +93,7 @@ extern int get_option(char **str, int *pint);
extern char *get_options(const char *str, int nints, int *ints);
extern unsigned long long memparse(char *ptr, char **retptr);
+extern int __kernel_text_address(unsigned long addr);
extern int kernel_text_address(unsigned long addr);
extern int session_of_pgrp(int pgrp);