Skip to content

Commit 1c99a68

Browse files
Markus TrippelsdorfIngo Molnar
authored andcommitted
x86/debug: Fix the printk() debug output of signal_fault(), do_trap() and do_general_protection()
Since commit: 4bcc595 "printk: reinstate KERN_CONT for printing" ... the debug output of signal_fault(), do_trap() and do_general_protection() looks garbled, e.g.: traps: conftest[9335] trap invalid opcode ip:400428 sp:7ffeaba1b0d8 error:0 in conftest[400000+1000] (note the unintended line break.) Fix the bug by adding KERN_CONTs. Signed-off-by: Markus Trippelsdorf <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 6fdc6dd commit 1c99a68

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

arch/x86/kernel/signal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ void signal_fault(struct pt_regs *regs, void __user *frame, char *where)
846846
task_pid_nr(current) > 1 ? KERN_INFO : KERN_EMERG,
847847
me->comm, me->pid, where, frame,
848848
regs->ip, regs->sp, regs->orig_ax);
849-
print_vma_addr(" in ", regs->ip);
849+
print_vma_addr(KERN_CONT " in ", regs->ip);
850850
pr_cont("\n");
851851
}
852852

arch/x86/kernel/traps.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs,
255255
pr_info("%s[%d] trap %s ip:%lx sp:%lx error:%lx",
256256
tsk->comm, tsk->pid, str,
257257
regs->ip, regs->sp, error_code);
258-
print_vma_addr(" in ", regs->ip);
258+
print_vma_addr(KERN_CONT " in ", regs->ip);
259259
pr_cont("\n");
260260
}
261261

@@ -519,7 +519,7 @@ do_general_protection(struct pt_regs *regs, long error_code)
519519
pr_info("%s[%d] general protection ip:%lx sp:%lx error:%lx",
520520
tsk->comm, task_pid_nr(tsk),
521521
regs->ip, regs->sp, error_code);
522-
print_vma_addr(" in ", regs->ip);
522+
print_vma_addr(KERN_CONT " in ", regs->ip);
523523
pr_cont("\n");
524524
}
525525

0 commit comments

Comments
 (0)