Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163520
b: refs/heads/master
c: 5a0ab35
h: refs/heads/master
v: v3
  • Loading branch information
Andre Draszik authored and Paul Mundt committed Aug 24, 2009
1 parent d169526 commit 162f82a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7436cde6b2ca71049051620c68c26522bb3403bf
refs/heads/master: 5a0ab35e43a6e3c69893c0091fe6a78ea8b3e443
20 changes: 10 additions & 10 deletions trunk/arch/sh/kernel/traps_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,12 +621,21 @@ asmlinkage void do_address_error(struct pt_regs *regs,

se_user += 1;

#ifndef CONFIG_CPU_SH2A
set_fs(USER_DS);
if (copy_from_user(&instruction, (u16 *)(regs->pc & ~1), 2)) {
set_fs(oldfs);
goto uspace_segv;
}
set_fs(oldfs);

/* shout about userspace fixups */
if (se_usermode & 1)
printk(KERN_NOTICE "Unaligned userspace access "
"in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
current->comm, current->pid, (void *)regs->pc,
instruction);
#endif

if (se_usermode & 2)
goto fixup;
Expand All @@ -635,7 +644,7 @@ asmlinkage void do_address_error(struct pt_regs *regs,
goto uspace_segv;
else {
/* ignore */
trace_mark(kernel_arch_trap_exit, MARK_NOARGS);
regs->pc += instruction_size(instruction);
return;
}

Expand All @@ -647,15 +656,6 @@ asmlinkage void do_address_error(struct pt_regs *regs,
}

set_fs(USER_DS);
if (copy_from_user(&instruction, (void __user *)(regs->pc),
sizeof(instruction))) {
/* Argh. Fault on the instruction itself.
This should never happen non-SMP
*/
set_fs(oldfs);
goto uspace_segv;
}

tmp = handle_unaligned_access(instruction, regs,
&user_mem_access);
set_fs(oldfs);
Expand Down

0 comments on commit 162f82a

Please sign in to comment.