From: Andrew Morton kernel/kprobes.c: In function `in_kprobes_functions': kernel/kprobes.c:516: error: `kprobe_blacklist' undeclared (first use in this function) kernel/kprobes.c:516: error: (Each undeclared identifier is reported only once kernel/kprobes.c:516: error: for each function it appears in.) kernel/kprobes.c: In function `init_kprobes': kernel/kprobes.c:860: error: `kprobe_blacklist' undeclared (first use in this function) Cc: Ananth N Mavinakayanahalli Cc: Dave Hansen Cc: Jim Keniston Cc: Srinivasa DS Cc: "David S. Miller" Signed-off-by: Andrew Morton --- kernel/kprobes.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff -puN kernel/kprobes.c~kprobes-prevent-probing-of-preempt_schedule-fix kernel/kprobes.c --- a/kernel/kprobes.c~kprobes-prevent-probing-of-preempt_schedule-fix +++ a/kernel/kprobes.c @@ -72,6 +72,18 @@ DEFINE_MUTEX(kprobe_mutex); /* Protects DEFINE_SPINLOCK(kretprobe_lock); /* Protects kretprobe_inst_table */ static DEFINE_PER_CPU(struct kprobe *, kprobe_instance) = NULL; +/* + * Normally, functions that we'd want to prohibit kprobes in, are marked + * __kprobes. But, there are cases where such functions already belong to + * a different section (__sched for preempt_schedule) + * + * For such cases, we now have a blacklist + */ +struct kprobe_blackpoint kprobe_blacklist[] = { + {"preempt_schedule",}, + {NULL} /* Terminator */ +}; + #ifdef __ARCH_WANT_KPROBES_INSN_SLOT /* * kprobe->ainsn.insn points to the copy of the instruction to be @@ -89,18 +101,6 @@ struct kprobe_insn_page { int ngarbage; }; -/* - * Normally, functions that we'd want to prohibit kprobes in, are marked - * __kprobes. But, there are cases where such functions already belong to - * a different section (__sched for preempt_schedule) - * - * For such cases, we now have a blacklist - */ -struct kprobe_blackpoint kprobe_blacklist[] = { - {"preempt_schedule",}, - {NULL} /* Terminator */ -}; - enum kprobe_slot_state { SLOT_CLEAN = 0, SLOT_DIRTY = 1, _