]> git.baikalelectronics.ru Git - kernel.git/commit
sh: fix unaligned and nonexistent address handling
authorSUGIOKA Toshinobu <sugioka@itonet.co.jp>
Wed, 21 Jan 2009 00:42:10 +0000 (09:42 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 21 Jan 2009 09:35:55 +0000 (18:35 +0900)
commitffdbc18c517239960800ea5e7a8cacd0b64b41d9
tree71365a7c84c6493f602cae0e6f249f26c26ae4ea
parent9997c45cac463a124d1758b316af3ae5cddb43ef
sh: fix unaligned and nonexistent address handling

unaligned and nonexistent address causes wrong exception
handling in traps_32.c(handle_unaligned_access).

'handle_unalinged_ins' should return -EFAULT if address error
is fixed up with kernel exception table, otherwise
'handle_unaligned_access' increases already fixed program counter
and then crash.

for example
   ioctl(fd, TCGETA, (struct termio *)-1)
never return and stay in TASK_UNINTERRUPTIBLE state forever
in my kernel.

Signed-off-by: SUGIOKA Toshinobu <sugioka@itonet.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/traps_32.c