From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with ESMTP id AEA436B0075 for ; Fri, 18 Nov 2011 06:35:45 -0500 (EST) Received: from /spool/local by e28smtp07.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 18 Nov 2011 17:05:39 +0530 Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pAIBZQ1a4419824 for ; Fri, 18 Nov 2011 17:05:26 +0530 Received: from d28av02.in.ibm.com (loopback [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pAIBZPNB027247 for ; Fri, 18 Nov 2011 22:35:26 +1100 From: Srikar Dronamraju Date: Fri, 18 Nov 2011 16:39:23 +0530 Message-Id: <20111118110923.10512.69644.sendpatchset@srdronam.in.ibm.com> In-Reply-To: <20111118110631.10512.73274.sendpatchset@srdronam.in.ibm.com> References: <20111118110631.10512.73274.sendpatchset@srdronam.in.ibm.com> Subject: [PATCH v7 3.2-rc2 14/30] 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 9789b65..b9e1932 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; @@ -1229,6 +1230,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; @@ -1238,7 +1244,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