From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail144.messagelabs.com (mail144.messagelabs.com [216.82.254.51]) by kanga.kvack.org (Postfix) with ESMTP id 081FE6B0098 for ; Thu, 10 Nov 2011 14:06:05 -0500 (EST) Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245]) by e23smtp06.au.ibm.com (8.14.4/8.13.1) with ESMTP id pAAJ3tqo004060 for ; Fri, 11 Nov 2011 06:03:55 +1100 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pAAJ5GDu2978034 for ; Fri, 11 Nov 2011 06:05:16 +1100 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pAAJ5Fm8024848 for ; Fri, 11 Nov 2011 06:05:16 +1100 From: Srikar Dronamraju Date: Fri, 11 Nov 2011 00:10:16 +0530 Message-Id: <20111110184016.11361.91824.sendpatchset@srdronam.in.ibm.com> In-Reply-To: <20111110183725.11361.57827.sendpatchset@srdronam.in.ibm.com> References: <20111110183725.11361.57827.sendpatchset@srdronam.in.ibm.com> Subject: [PATCH v6 3.2-rc1 14/28] uprobe: register exception notifier Sender: owner-linux-mm@kvack.org List-ID: To: Peter Zijlstra , Linus Torvalds Cc: Oleg Nesterov , Andrew Morton , LKML , Linux-mm , Ingo Molnar , Andi Kleen , Christoph Hellwig , Steven Rostedt , Roland McGrath , Thomas Gleixner , Masami Hiramatsu , Arnaldo Carvalho de Melo , Anton Arapov , Ananth N Mavinakayanahalli , Jim Keniston , Stephen Wilson Use the notifier mechanism to register uprobes exception notifier. Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Srikar Dronamraju --- kernel/uprobes.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/kernel/uprobes.c b/kernel/uprobes.c index 2461b20..c4ccb89 100644 --- a/kernel/uprobes.c +++ b/kernel/uprobes.c @@ -30,6 +30,7 @@ #include /* set_pte_at_notify */ #include /* try_to_free_swap */ #include /* user_enable_single_step */ +#include /* notifier mechanism */ #include static bulkref_t uprobes_srcu; @@ -1235,6 +1236,11 @@ int uprobe_post_notifier(struct pt_regs *regs) return 1; } +struct notifier_block uprobe_exception_nb = { + .notifier_call = uprobe_exception_notify, + .priority = INT_MAX - 1, /* notified after kprobes, kgdb */ +}; + static int __init init_uprobes(void) { int i; @@ -1244,7 +1250,7 @@ static int __init init_uprobes(void) mutex_init(&uprobes_mmap_mutex[i]); } init_bulkref(&uprobes_srcu); - return 0; + return register_die_notifier(&uprobe_exception_nb); } static void __exit exit_uprobes(void) -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org