Commit 40258ee9 authored by Paul Mundt's avatar Paul Mundt

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: default avatarPaul Mundt <lethal@linux-sh.org>
parent 23c4c821
......@@ -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);
......
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