diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-01-02 22:41:36 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-01-02 22:41:36 +0100 |
| commit | 923a789b49c7269a0245d5af6afe486188d940df (patch) | |
| tree | c3f168427372e64f7467a794f313416da5086ba0 /kernel/notifier.c | |
| parent | 103ceffb9501531f6931df6aebc11a05189201f0 (diff) | |
| parent | b840d79631c882786925303c2b0f4fefc31845ed (diff) | |
Merge branch 'linus' into x86/cleanups
Conflicts:
arch/x86/kernel/reboot.c
Diffstat (limited to 'kernel/notifier.c')
| -rw-r--r-- | kernel/notifier.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/notifier.c b/kernel/notifier.c index 4282c0a40a5..61d5aa5eced 100644 --- a/kernel/notifier.c +++ b/kernel/notifier.c @@ -82,6 +82,14 @@ static int __kprobes notifier_call_chain(struct notifier_block **nl, while (nb && nr_to_call) { next_nb = rcu_dereference(nb->next); + +#ifdef CONFIG_DEBUG_NOTIFIERS + if (unlikely(!func_ptr_is_kernel_text(nb->notifier_call))) { + WARN(1, "Invalid notifier called!"); + nb = next_nb; + continue; + } +#endif ret = nb->notifier_call(nb, val, v); if (nr_calls) |
