Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166321
b: refs/heads/master
c: 23c4c82
h: refs/heads/master
i:
  166319: 50a264d
v: v3
  • Loading branch information
Paul Mundt committed Sep 24, 2009
1 parent 103ea4d commit f068a3f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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: acf3cc283f1ea4ed7e579663eefed62f0aa572da
refs/heads/master: 23c4c82171008c8b18d8627c9741cdd577631cea
11 changes: 8 additions & 3 deletions trunk/arch/sh/kernel/traps_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,12 @@ int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs,
u_int rm;
int ret, index;

/*
* XXX: We can't handle mixed 16/32-bit instructions yet
*/
if (instruction_size(instruction) != 2)
return -EINVAL;

index = (instruction>>8)&15; /* 0x0F00 */
rm = regs->regs[index];

Expand Down Expand Up @@ -619,9 +625,9 @@ 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)) {
if (copy_from_user(&instruction, (insn_size_t *)(regs->pc & ~1),
sizeof(instruction))) {
set_fs(oldfs);
goto uspace_segv;
}
Expand All @@ -633,7 +639,6 @@ asmlinkage void do_address_error(struct pt_regs *regs,
"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 Down

0 comments on commit f068a3f

Please sign in to comment.