X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=kernel%2Fnotifier.c;h=61d5aa5eced3466393582e4f566b63c468ea7cc3;hb=87246b7567f7d1951bfcea29875523ef435c0ebf;hp=4282c0a40a57ada651b86c7dcce2389abf489448;hpb=31f297143b9905647fa5ef12086626a6f172a4ea;p=linux-2.6-omap-h63xx.git 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)