Commit 5d1fadc1 authored by Valdis Kletnieks's avatar Valdis Kletnieks Committed by Linus Torvalds

kernel/signal.c: fix suboptimal printk usage

Several printk's were missing KERN_INFO and KERN_CONT flags.  In
addition, a printk that was outside a #if/#endif should have been
inside, which would result in stray blank line on non-x86 boxes.
Signed-off-by: default avatarValdis Kletnieks <valdis.kletnieks@vt.edu>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 66dd34ad
...@@ -1157,11 +1157,11 @@ static int send_signal(int sig, struct siginfo *info, struct task_struct *t, ...@@ -1157,11 +1157,11 @@ static int send_signal(int sig, struct siginfo *info, struct task_struct *t,
static void print_fatal_signal(int signr) static void print_fatal_signal(int signr)
{ {
struct pt_regs *regs = signal_pt_regs(); struct pt_regs *regs = signal_pt_regs();
printk("%s/%d: potentially unexpected fatal signal %d.\n", printk(KERN_INFO "%s/%d: potentially unexpected fatal signal %d.\n",
current->comm, task_pid_nr(current), signr); current->comm, task_pid_nr(current), signr);
#if defined(__i386__) && !defined(__arch_um__) #if defined(__i386__) && !defined(__arch_um__)
printk("code at %08lx: ", regs->ip); printk(KERN_INFO "code at %08lx: ", regs->ip);
{ {
int i; int i;
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
...@@ -1169,11 +1169,11 @@ static void print_fatal_signal(int signr) ...@@ -1169,11 +1169,11 @@ static void print_fatal_signal(int signr)
if (get_user(insn, (unsigned char *)(regs->ip + i))) if (get_user(insn, (unsigned char *)(regs->ip + i)))
break; break;
printk("%02x ", insn); printk(KERN_CONT "%02x ", insn);
} }
} }
printk(KERN_CONT "\n");
#endif #endif
printk("\n");
preempt_disable(); preempt_disable();
show_regs(regs); show_regs(regs);
preempt_enable(); preempt_enable();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment