diff options
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r-- | sys/kern/kern_thread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index f47beec..a08805e 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -399,10 +399,10 @@ kse_switchin(struct thread *td, struct kse_switchin_args *uap) error = (uap->mcp == NULL) ? EINVAL : 0; if (!error) error = copyin(uap->mcp, &mc, sizeof(mc)); + if (!error && uap->loc != NULL) + error = (suword(uap->loc, uap->val) != 0) ? EINVAL : 0; if (!error) error = set_mcontext(td, &mc); - if (!error && uap->loc != NULL) - suword(uap->loc, uap->val); return ((error == 0) ? EJUSTRETURN : error); } |