From: Anil S Keshavamurthy Date: Mon, 26 Jun 2006 07:25:28 +0000 (-0700) Subject: [PATCH] Kprobes registers for notify page fault X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3d5631e0631a11633c649bc995a6537ec21b67b4;p=openwrt%2Fstaging%2Fblogic.git [PATCH] Kprobes registers for notify page fault Kprobes now registers for page fault notifications. Signed-off-by: Anil S Keshavamurthy Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/kprobes.c b/kernel/kprobes.c index f095178e48c3..507f26e7ae7c 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -556,6 +556,11 @@ valid_p: } static struct notifier_block kprobe_exceptions_nb = { + .notifier_call = kprobe_exceptions_notify, + .priority = 0x7fffffff /* we need to be notified first */ +}; + +static struct notifier_block kprobe_page_fault_nb = { .notifier_call = kprobe_exceptions_notify, .priority = 0x7fffffff /* we need to notified first */ }; @@ -673,6 +678,9 @@ static int __init init_kprobes(void) if (!err) err = register_die_notifier(&kprobe_exceptions_nb); + if (!err) + err = register_page_fault_notifier(&kprobe_page_fault_nb); + return err; }