]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
x86: signal: use signal_fault() in sys_sigreturn()
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Tue, 16 Dec 2008 22:02:16 +0000 (14:02 -0800)
committerIngo Molnar <mingo@elte.hu>
Tue, 16 Dec 2008 22:06:07 +0000 (23:06 +0100)
Impact: cleanup

Call signal_fault() in error route of sys_sigreturn().
Change log level to KERN_EMERG if current is init.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/signal.c

index b1cc6da64208bcb621bd3a841e76b53055c6a95e..2725a294d73458ccc33808a5cb34e0cdd92df1a1 100644 (file)
@@ -594,17 +594,7 @@ asmlinkage unsigned long sys_sigreturn(unsigned long __unused)
        return ax;
 
 badframe:
-       if (show_unhandled_signals && printk_ratelimit()) {
-               printk("%s%s[%d] bad frame in sigreturn frame:"
-                       "%p ip:%lx sp:%lx oeax:%lx",
-                   task_pid_nr(current) > 1 ? KERN_INFO : KERN_EMERG,
-                   current->comm, task_pid_nr(current), frame, regs->ip,
-                   regs->sp, regs->orig_ax);
-               print_vma_addr(" in ", regs->ip);
-               printk(KERN_CONT "\n");
-       }
-
-       force_sig(SIGSEGV, current);
+       signal_fault(regs, frame, "sigreturn");
 
        return 0;
 }
@@ -901,8 +891,9 @@ void signal_fault(struct pt_regs *regs, void __user *frame, char *where)
        struct task_struct *me = current;
 
        if (show_unhandled_signals && printk_ratelimit()) {
-               printk(KERN_INFO
+               printk("%s"
                       "%s[%d] bad frame in %s frame:%p ip:%lx sp:%lx orax:%lx",
+                      task_pid_nr(current) > 1 ? KERN_INFO : KERN_EMERG,
                       me->comm, me->pid, where, frame,
                       regs->ip, regs->sp, regs->orig_ax);
                print_vma_addr(" in ", regs->ip);