aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/extable.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-03-20 06:05:04 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-20 06:09:27 -0400
commit505f2b970b2269ce4cb669b3ff4f6479d379cec2 (patch)
tree741b9ed4752d852eb8b01dd4b4be765c9f37015e /kernel/extable.c
parent22de89b371a18086162eacd9f8c960299334ab01 (diff)
tracing, Text Edit Lock - kprobes architecture independent support, nommu fix
Impact: build fix on SH !CONFIG_MMU Stephen Rothwell reported this linux-next build failure on the SH architecture: kernel/built-in.o: In function `disable_all_kprobes': kernel/kprobes.c:1382: undefined reference to `text_mutex' [...] And observed: | Introduced by commit 4460fdad85becd569f11501ad5b91814814335ff ("tracing, | Text Edit Lock - kprobes architecture independent support") from the | tracing tree. text_mutex is defined in mm/memory.c which is only built | if CONFIG_MMU is defined, which is not true for sh allmodconfig. Move this lock to kernel/extable.c (which is already home to various kernel text related routines), which file is always built-in. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> LKML-Reference: <20090320110602.86351a91.sfr@canb.auug.org.au> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/extable.c')
-rw-r--r--kernel/extable.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/kernel/extable.c b/kernel/extable.c
index 0df6253730be..25d39b0c3a1b 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -15,11 +15,21 @@
15 along with this program; if not, write to the Free Software 15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17*/ 17*/
18#include <linux/ftrace.h>
18#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/mutex.h>
19#include <linux/init.h> 21#include <linux/init.h>
20#include <linux/ftrace.h> 22
21#include <asm/uaccess.h>
22#include <asm/sections.h> 23#include <asm/sections.h>
24#include <asm/uaccess.h>
25
26/*
27 * mutex protecting text section modification (dynamic code patching).
28 * some users need to sleep (allocating memory...) while they hold this lock.
29 *
30 * NOT exported to modules - patching kernel text is a really delicate matter.
31 */
32DEFINE_MUTEX(text_mutex);
23 33
24extern struct exception_table_entry __start___ex_table[]; 34extern struct exception_table_entry __start___ex_table[];
25extern struct exception_table_entry __stop___ex_table[]; 35extern struct exception_table_entry __stop___ex_table[];