x86: traps_xx: modify __die

if (cond) block -> if (!cond) goto end_of_block

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Alexander van Heukelum 2008-07-02 01:31:03 +02:00 committed by Ingo Molnar
commit e423f49fc8
2 changed files with 15 additions and 19 deletions

View file

@ -399,9 +399,9 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
printk("DEBUG_PAGEALLOC"); printk("DEBUG_PAGEALLOC");
#endif #endif
printk("\n"); printk("\n");
if (notify_die(DIE_OOPS, str, regs, err, if (notify_die(DIE_OOPS, str, regs, err,
current->thread.trap_no, SIGSEGV) != NOTIFY_STOP) { current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
return 1;
show_registers(regs); show_registers(regs);
/* Executive summary in case the oops scrolled away */ /* Executive summary in case the oops scrolled away */
@ -414,13 +414,9 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
printk(KERN_EMERG "EIP: [<%08lx>] ", regs->ip); printk(KERN_EMERG "EIP: [<%08lx>] ", regs->ip);
print_symbol("%s", regs->ip); print_symbol("%s", regs->ip);
printk(" SS:ESP %04x:%08lx\n", ss, sp); printk(" SS:ESP %04x:%08lx\n", ss, sp);
return 0; return 0;
} }
return 1;
}
/* /*
* This is gone through when something in the kernel has done something bad * This is gone through when something in the kernel has done something bad
* and is about to be terminated: * and is about to be terminated: