From 2bf93af129d87ecc09ac73c40895ca620f9f8762 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 4 Nov 1999 07:21:41 +0000 Subject: [PATCH] Eliminate two useracc(..., VM_PROT_READ) calls that immediately precede copyin() calls. Submitted by: bde --- sys/alpha/alpha/machdep.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 76dce71f4810..23bfd97aeb59 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -1418,11 +1418,9 @@ osigreturn(struct proc *p, return (EINVAL); /* - * Test and fetch the context structure. - * We grab it all at once for speed. + * Fetch the entire context structure at once for speed. */ - if (useracc((caddr_t)scp, sizeof (*scp), VM_PROT_READ) == 0 || - copyin((caddr_t)scp, (caddr_t)&ksc, sizeof ksc)) + if (copyin((caddr_t)scp, (caddr_t)&ksc, sizeof ksc)) return (EINVAL); /* @@ -1488,11 +1486,9 @@ sigreturn(struct proc *p, return (EINVAL); /* - * Test and fetch the context structure. - * We grab it all at once for speed. + * Fetch the entire context structure at once for speed. */ - if (useracc((caddr_t)ucp, sizeof(ucontext_t), VM_PROT_READ) == 0 || - copyin((caddr_t)ucp, (caddr_t)&uc, sizeof(ucontext_t))) + if (copyin((caddr_t)ucp, (caddr_t)&uc, sizeof(ucontext_t))) return (EINVAL); /*