diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-09-24 17:48:15 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-09-24 17:48:15 +0900 |
commit | 40258ee97d0d5e5c30a3d4b7acaf294fe82cd23f (patch) | |
tree | ed24df0faa1ee30229194e615545a494d17857f0 /arch/sh/kernel/traps_32.c | |
parent | 23c4c82171008c8b18d8627c9741cdd577631cea (diff) | |
download | blackbird-obmc-linux-40258ee97d0d5e5c30a3d4b7acaf294fe82cd23f.tar.gz blackbird-obmc-linux-40258ee97d0d5e5c30a3d4b7acaf294fe82cd23f.zip |
sh: Fix up uninitialized variable use caught by gcc 4.4.
In the unaligned kernel exception fixup case the printk() was ordered
before the copy_from_user(), resulting in a nonsensical instruction
value. This fixes up the ordering properly.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/traps_32.c')
-rw-r--r-- | arch/sh/kernel/traps_32.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c index f9760c5c234a..69bb1652eccd 100644 --- a/arch/sh/kernel/traps_32.c +++ b/arch/sh/kernel/traps_32.c @@ -678,12 +678,6 @@ uspace_segv: } else { se_sys += 1; - if (se_kernmode_warn) - printk(KERN_NOTICE "Unaligned kernel access " - "on behalf of \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", - current->comm, current->pid, (void *)regs->pc, - instruction); - if (regs->pc & 1) die("unaligned program counter", regs, error_code); @@ -697,6 +691,12 @@ uspace_segv: die("insn faulting in do_address_error", regs, 0); } + if (se_kernmode_warn) + printk(KERN_NOTICE "Unaligned kernel access " + "on behalf of \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", + current->comm, current->pid, (void *)regs->pc, + instruction); + handle_unaligned_access(instruction, regs, &user_mem_access, 0); set_fs(oldfs); |