[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20111110184016.11361.91824.sendpatchset@srdronam.in.ibm.com>
Date: Fri, 11 Nov 2011 00:10:16 +0530
From: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To: Peter Zijlstra <peterz@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Oleg Nesterov <oleg@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Linux-mm <linux-mm@...ck.org>, Ingo Molnar <mingo@...e.hu>,
Andi Kleen <andi@...stfloor.org>,
Christoph Hellwig <hch@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
Roland McGrath <roland@...k.frob.com>,
Thomas Gleixner <tglx@...utronix.de>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Arnaldo Carvalho de Melo <acme@...radead.org>,
Anton Arapov <anton@...hat.com>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Jim Keniston <jkenisto@...ux.vnet.ibm.com>,
Stephen Wilson <wilsons@...rt.ca>
Subject: [PATCH v6 3.2-rc1 14/28] uprobe: register exception notifier
Use the notifier mechanism to register uprobes exception notifier.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@...ibm.com>
Signed-off-by: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
---
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 <linux/mmu_notifier.h> /* set_pte_at_notify */
#include <linux/swap.h> /* try_to_free_swap */
#include <linux/ptrace.h> /* user_enable_single_step */
+#include <linux/kdebug.h> /* notifier mechanism */
#include <linux/uprobes.h>
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists