Commit f14d6b4f authored by Al Viro's avatar Al Viro

alpha: don't bother with __access_ok() in traps.c

	we want to check that address is below TASK_SIZE; sure,
__access_ok(addr, 0, USER_DS) will do that, but it's more straightforward
to just spell it out and that way we can get rid of the damn 'segment'
argument of __access_ok().
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent d78d834b
...@@ -802,7 +802,7 @@ do_entUnaUser(void __user * va, unsigned long opcode, ...@@ -802,7 +802,7 @@ do_entUnaUser(void __user * va, unsigned long opcode,
/* Don't bother reading ds in the access check since we already /* Don't bother reading ds in the access check since we already
know that this came from the user. Also rely on the fact that know that this came from the user. Also rely on the fact that
the page at TASK_SIZE is unmapped and so can't be touched anyway. */ the page at TASK_SIZE is unmapped and so can't be touched anyway. */
if (!__access_ok((unsigned long)va, 0, USER_DS)) if ((unsigned long)va >= TASK_SIZE)
goto give_sigsegv; goto give_sigsegv;
++unaligned[1].count; ++unaligned[1].count;
...@@ -1047,7 +1047,7 @@ do_entUnaUser(void __user * va, unsigned long opcode, ...@@ -1047,7 +1047,7 @@ do_entUnaUser(void __user * va, unsigned long opcode,
/* We need to replicate some of the logic in mm/fault.c, /* We need to replicate some of the logic in mm/fault.c,
since we don't have access to the fault code in the since we don't have access to the fault code in the
exception handling return path. */ exception handling return path. */
if (!__access_ok((unsigned long)va, 0, USER_DS)) if ((unsigned long)va >= TASK_SIZE)
info.si_code = SEGV_ACCERR; info.si_code = SEGV_ACCERR;
else { else {
struct mm_struct *mm = current->mm; struct mm_struct *mm = current->mm;
......
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