Commit 2b692a87 authored by Roberto Nibali's avatar Roberto Nibali Committed by Linus Torvalds

[PATCH] x86_64: Clean up white space in traps.c

Attached is a small code style cleanup patch that resulted from my
skimming through the arch/x86_64/kernel/traps.c code to figure out what
went haywire.
Signed-off-by: default avatarRoberto Nibali <ratz@drugphish.ch>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b2b978f9
...@@ -124,7 +124,7 @@ int printk_address(unsigned long address) ...@@ -124,7 +124,7 @@ int printk_address(unsigned long address)
if (!modname) if (!modname)
modname = delim = ""; modname = delim = "";
return printk("<%016lx>{%s%s%s%s%+ld}", return printk("<%016lx>{%s%s%s%s%+ld}",
address,delim,modname,delim,symname,offset); address, delim, modname, delim, symname, offset);
} }
#else #else
int printk_address(unsigned long address) int printk_address(unsigned long address)
...@@ -336,13 +336,12 @@ void show_registers(struct pt_regs *regs) ...@@ -336,13 +336,12 @@ void show_registers(struct pt_regs *regs)
show_stack(NULL, (unsigned long*)rsp); show_stack(NULL, (unsigned long*)rsp);
printk("\nCode: "); printk("\nCode: ");
if(regs->rip < PAGE_OFFSET) if (regs->rip < PAGE_OFFSET)
goto bad; goto bad;
for(i=0;i<20;i++) for (i=0; i<20; i++) {
{
unsigned char c; unsigned char c;
if(__get_user(c, &((unsigned char*)regs->rip)[i])) { if (__get_user(c, &((unsigned char*)regs->rip)[i])) {
bad: bad:
printk(" Bad RIP value."); printk(" Bad RIP value.");
break; break;
...@@ -481,7 +480,7 @@ static void __kprobes do_trap(int trapnr, int signr, char *str, ...@@ -481,7 +480,7 @@ static void __kprobes do_trap(int trapnr, int signr, char *str,
printk(KERN_INFO printk(KERN_INFO
"%s[%d] trap %s rip:%lx rsp:%lx error:%lx\n", "%s[%d] trap %s rip:%lx rsp:%lx error:%lx\n",
tsk->comm, tsk->pid, str, tsk->comm, tsk->pid, str,
regs->rip,regs->rsp,error_code); regs->rip, regs->rsp, error_code);
if (info) if (info)
force_sig_info(signr, info, tsk); force_sig_info(signr, info, tsk);
...@@ -495,9 +494,9 @@ static void __kprobes do_trap(int trapnr, int signr, char *str, ...@@ -495,9 +494,9 @@ static void __kprobes do_trap(int trapnr, int signr, char *str,
{ {
const struct exception_table_entry *fixup; const struct exception_table_entry *fixup;
fixup = search_exception_tables(regs->rip); fixup = search_exception_tables(regs->rip);
if (fixup) { if (fixup)
regs->rip = fixup->fixup; regs->rip = fixup->fixup;
} else else
die(str, regs, error_code); die(str, regs, error_code);
return; return;
} }
...@@ -570,7 +569,7 @@ asmlinkage void __kprobes do_general_protection(struct pt_regs * regs, ...@@ -570,7 +569,7 @@ asmlinkage void __kprobes do_general_protection(struct pt_regs * regs,
printk(KERN_INFO printk(KERN_INFO
"%s[%d] general protection rip:%lx rsp:%lx error:%lx\n", "%s[%d] general protection rip:%lx rsp:%lx error:%lx\n",
tsk->comm, tsk->pid, tsk->comm, tsk->pid,
regs->rip,regs->rsp,error_code); regs->rip, regs->rsp, error_code);
force_sig(SIGSEGV, tsk); force_sig(SIGSEGV, tsk);
return; return;
......
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