summaryrefslogtreecommitdiff
path: root/sys/kern/kern_thread.c
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2003-12-10 01:59:23 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2003-12-10 01:59:23 +0000
commitccb46feb8e360bdaf6ca49231226680405f2408c (patch)
tree0be9d3954bbeb43fd1472bd3c16e9facdccca175 /sys/kern/kern_thread.c
parent6ed6ccb31089414b6fb75f044ddff2fec29b7191 (diff)
Notes
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r--sys/kern/kern_thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
index f47beecb175c..a08805ed2935 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);
}