kprobes: support probing module __exit function
[pandora-kernel.git] / include / linux / kprobes.h
index b93e44c..d6ea19e 100644 (file)
@@ -69,9 +69,6 @@ struct kprobe {
        /* list of kprobes for multi-handler support */
        struct list_head list;
 
-       /* Indicates that the corresponding module has been ref counted */
-       unsigned int mod_refcounted;
-
        /*count the number of times this probe was temporarily disarmed */
        unsigned long nmissed;
 
@@ -103,8 +100,19 @@ struct kprobe {
 
        /* copy of the original instruction */
        struct arch_specific_insn ainsn;
+
+       /* Indicates various status flags.  Protected by kprobe_mutex. */
+       u32 flags;
 };
 
+/* Kprobe status flags */
+#define KPROBE_FLAG_GONE       1 /* breakpoint has already gone */
+
+static inline int kprobe_gone(struct kprobe *p)
+{
+       return p->flags & KPROBE_FLAG_GONE;
+}
+
 /*
  * Special probe type that uses setjmp-longjmp type tricks to resume
  * execution at a specified entry with a matching prototype corresponding