diff options
author | jhb <jhb@FreeBSD.org> | 2003-04-25 19:52:30 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-04-25 19:52:30 +0000 |
commit | 8db9172888dfef999398ecc89d0eaa7bfa1d8ee1 (patch) | |
tree | 7c583ce3574489c2254a1a7bc1f059cbbe1c5aa0 | |
parent | 61d12d651940a5b8227a7eb7c8cb8dc39a98ebb8 (diff) | |
download | FreeBSD-src-8db9172888dfef999398ecc89d0eaa7bfa1d8ee1.zip FreeBSD-src-8db9172888dfef999398ecc89d0eaa7bfa1d8ee1.tar.gz |
Lock Giant around calls to useracc() in osf1_sigreturn() so that the
function is MP safe.
-rw-r--r-- | sys/alpha/osf1/osf1_signal.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/alpha/osf1/osf1_signal.c b/sys/alpha/osf1/osf1_signal.c index d2ecd39..3f03ef1 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. |