From 718e4d2f64c97821f2ad9e365635dd33542b7448 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 29 Apr 2003 06:33:03 +0000 Subject: [PATCH] - Remove unnecessary useracc() calls from osf1_sigreturn(). --- sys/alpha/osf1/osf1_signal.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/sys/alpha/osf1/osf1_signal.c b/sys/alpha/osf1/osf1_signal.c index 3f03ef173718..bc3e06c9d95d 100644 --- a/sys/alpha/osf1/osf1_signal.c +++ b/sys/alpha/osf1/osf1_signal.c @@ -572,21 +572,12 @@ osf1_sigreturn(struct thread *td, p = td->td_proc; scp = uap->sigcntxp; - mtx_lock(&Giant); - if (useracc((caddr_t)scp, sizeof (*scp), VM_PROT_READ) == 0 ) { - uprintf("uac fails\n"); - uprintf("scp: %p\n", scp); - } + /* - * 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)) { - mtx_unlock(&Giant); + if (copyin((caddr_t)scp, (caddr_t)&ksc, sizeof ksc)) return (EFAULT); - } - mtx_unlock(&Giant); /* * Restore the user-supplied information.