From 1ffb1ca21b8db814cdbd8638b6c3b1ddece5aec1 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Fri, 24 Apr 1998 19:49:34 +0000 Subject: Fri Apr 24 14:24:15 1998 Thomas Bushnell, n/BSG * i386/i386/pcb.c (thread_setstatus): Set STATE before validating segment registers. Reported by UCHIYAMA Fasushi (uch@nop.or.jp). --- i386/i386/pcb.c | 4 ++-- 1 file 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); /* -- cgit v1.2.3