aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-09-24 04:48:15 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-09-24 04:48:15 -0400
commit40258ee97d0d5e5c30a3d4b7acaf294fe82cd23f (patch)
treeed24df0faa1ee30229194e615545a494d17857f0 /arch
parent23c4c82171008c8b18d8627c9741cdd577631cea (diff)
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')
-rw-r--r--arch/sh/kernel/traps_32.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c
index f9760c5c234..69bb1652ecc 100644
--- a/arch/sh/kernel/traps_32.c
+++ b/arch/sh/kernel/traps_32.c
@@ -678,12 +678,6 @@ uspace_segv:
678 } else { 678 } else {
679 se_sys += 1; 679 se_sys += 1;
680 680
681 if (se_kernmode_warn)
682 printk(KERN_NOTICE "Unaligned kernel access "
683 "on behalf of \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
684 current->comm, current->pid, (void *)regs->pc,
685 instruction);
686
687 if (regs->pc & 1) 681 if (regs->pc & 1)
688 die("unaligned program counter", regs, error_code); 682 die("unaligned program counter", regs, error_code);
689 683
@@ -697,6 +691,12 @@ uspace_segv:
697 die("insn faulting in do_address_error", regs, 0); 691 die("insn faulting in do_address_error", regs, 0);
698 } 692 }
699 693
694 if (se_kernmode_warn)
695 printk(KERN_NOTICE "Unaligned kernel access "
696 "on behalf of \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
697 current->comm, current->pid, (void *)regs->pc,
698 instruction);
699
700 handle_unaligned_access(instruction, regs, 700 handle_unaligned_access(instruction, regs,
701 &user_mem_access, 0); 701 &user_mem_access, 0);
702 set_fs(oldfs); 702 set_fs(oldfs);