summaryrefslogtreecommitdiffstats
path: root/sys/i386/svr4/svr4_machdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/svr4/svr4_machdep.c')
-rw-r--r--sys/i386/svr4/svr4_machdep.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/i386/svr4/svr4_machdep.c b/sys/i386/svr4/svr4_machdep.c
index 848ceb9..d29e37b 100644
--- a/sys/i386/svr4/svr4_machdep.c
+++ b/sys/i386/svr4/svr4_machdep.c
@@ -216,8 +216,10 @@ svr4_setcontext(td, uc)
* set to 0 right now?
*/
- if ((uc->uc_flags & SVR4_UC_CPU) == 0)
+ if ((uc->uc_flags & SVR4_UC_CPU) == 0) {
+ PROC_UNLOCK(p);
return 0;
+ }
DPRINTF(("svr4_setcontext(%d)\n", p->p_pid));
@@ -244,8 +246,10 @@ svr4_setcontext(td, uc)
* the trap, rather than doing all of the checking here.
*/
if (((r[SVR4_X86_EFL] ^ tf->tf_eflags) & PSL_USERSTATIC) != 0 ||
- !USERMODE(r[SVR4_X86_CS], r[SVR4_X86_EFL]))
+ !USERMODE(r[SVR4_X86_CS], r[SVR4_X86_EFL])) {
+ PROC_UNLOCK(p);
return (EINVAL);
+ }
#if defined(__NetBSD__)
/* %fs and %gs were restored by the trampoline. */
OpenPOWER on IntegriCloud