OSDN Git Service

samples/kprobes: Fix typo in handler_fault()
authorTiezhu Yang <yangtiezhu@loongson.cn>
Mon, 17 May 2021 02:21:22 +0000 (10:21 +0800)
committerJonathan Corbet <corbet@lwn.net>
Thu, 20 May 2021 20:02:54 +0000 (14:02 -0600)
Fix a defective format in handler_fault() ending with an 'n' that
should be '\n'.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/1621218083-23519-2-git-send-email-yangtiezhu@loongson.cn
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
samples/kprobes/kprobe_example.c

index c495664..d77a546 100644 (file)
@@ -101,7 +101,7 @@ static void __kprobes handler_post(struct kprobe *p, struct pt_regs *regs,
  */
 static int handler_fault(struct kprobe *p, struct pt_regs *regs, int trapnr)
 {
-       pr_info("fault_handler: p->addr = 0x%p, trap #%dn", p->addr, trapnr);
+       pr_info("fault_handler: p->addr = 0x%p, trap #%d\n", p->addr, trapnr);
        /* Return 0 because we don't handle the fault. */
        return 0;
 }