summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1998-04-24 19:49:34 +0000
committerThomas Bushnell <thomas@gnu.org>1998-04-24 19:49:34 +0000
commit1ffb1ca21b8db814cdbd8638b6c3b1ddece5aec1 (patch)
tree4ec9fa789b26b05ee3bade0630bb2dd2b89dad93
parent0b32f38287b6563c4eed379c2d3ea121de2979c1 (diff)
Fri Apr 24 14:24:15 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
* i386/i386/pcb.c (thread_setstatus): Set STATE before validating segment registers. Reported by UCHIYAMA Fasushi (uch@nop.or.jp).
-rw-r--r--i386/i386/pcb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c
index f16f21a..09e2597 100644
--- a/i386/i386/pcb.c
+++ b/i386/i386/pcb.c
@@ -398,6 +398,8 @@ kern_return_t thread_setstatus(thread, flavor, tstate, count)
return(KERN_INVALID_ARGUMENT);
}
+ state = (struct i386_thread_state *) tstate;
+
if (flavor == i386_REGS_SEGS_STATE) {
/*
* Code and stack selectors must not be null,
@@ -416,8 +418,6 @@ kern_return_t thread_setstatus(thread, flavor, tstate, count)
return KERN_INVALID_ARGUMENT;
}
- state = (struct i386_thread_state *) tstate;
-
saved_state = USER_REGS(thread);
/*