Merge tag 'docs-5.14' of git://git.lwn.net/linux
[linux-2.6-microblaze.git] / samples / kprobes / kprobe_example.c
index 5f1eb8b..f991a66 100644 (file)
@@ -95,26 +95,11 @@ static void __kprobes handler_post(struct kprobe *p, struct pt_regs *regs,
 #endif
 }
 
-/*
- * fault_handler: this is called if an exception is generated for any
- * instruction within the pre- or post-handler, or when Kprobes
- * single-steps the probed instruction.
- */
-static int handler_fault(struct kprobe *p, struct pt_regs *regs, int trapnr)
-{
-       pr_info("p->addr = 0x%p, trap #%d\n", p->addr, trapnr);
-       /* Return 0 because we don't handle the fault. */
-       return 0;
-}
-/* NOKPROBE_SYMBOL() is also available */
-NOKPROBE_SYMBOL(handler_fault);
-
 static int __init kprobe_init(void)
 {
        int ret;
        kp.pre_handler = handler_pre;
        kp.post_handler = handler_post;
-       kp.fault_handler = handler_fault;
 
        ret = register_kprobe(&kp);
        if (ret < 0) {