summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2003-04-25 19:52:30 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2003-04-25 19:52:30 +0000
commitfdbaa60278d99ae90b16185ad58f959230b3a0fe (patch)
tree7c583ce3574489c2254a1a7bc1f059cbbe1c5aa0
parentb11c8f53dcbd5263a17f546ae4eb47c0ea5d5987 (diff)
Notes
-rw-r--r--sys/alpha/osf1/osf1_signal.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/alpha/osf1/osf1_signal.c b/sys/alpha/osf1/osf1_signal.c
index d2ecd39d1e92..3f03ef173718 100644
--- a/sys/alpha/osf1/osf1_signal.c
+++ b/sys/alpha/osf1/osf1_signal.c
@@ -572,6 +572,7 @@ 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);
@@ -581,8 +582,11 @@ osf1_sigreturn(struct thread *td,
* We grab it all at once for speed.
*/
if (useracc((caddr_t)scp, sizeof (*scp), VM_PROT_READ) == 0 ||
- copyin((caddr_t)scp, (caddr_t)&ksc, sizeof ksc))
+ copyin((caddr_t)scp, (caddr_t)&ksc, sizeof ksc)) {
+ mtx_unlock(&Giant);
return (EFAULT);
+ }
+ mtx_unlock(&Giant);
/*
* Restore the user-supplied information.