Initialize eflags in fake frame to default value rather than random one.
The random value sometimes causes macro CLKF_USERMODE to return true because PSL_VM bit is set and really shoudn't be, this causes statclock() to execute in wrong path, and further breaks KSE code and kernel crashes when executing threaded program.
This commit is contained in:
parent
6b1db7e808
commit
1108975fe0
@ -94,6 +94,7 @@ i386_unpend(void)
|
||||
|
||||
frame.cf_cs = SEL_KPL;
|
||||
frame.cf_eip = (register_t)i386_unpend;
|
||||
frame.cf_eflags = PSL_KERNEL;
|
||||
KASSERT(curthread->td_critnest == 0, ("unpend critnest != 0"));
|
||||
KASSERT((read_eflags() & PSL_I) == 0, ("unpend interrupts enabled1"));
|
||||
curthread->td_critnest = 1;
|
||||
|
@ -94,6 +94,7 @@ i386_unpend(void)
|
||||
|
||||
frame.cf_cs = SEL_KPL;
|
||||
frame.cf_eip = (register_t)i386_unpend;
|
||||
frame.cf_eflags = PSL_KERNEL;
|
||||
KASSERT(curthread->td_critnest == 0, ("unpend critnest != 0"));
|
||||
KASSERT((read_eflags() & PSL_I) == 0, ("unpend interrupts enabled1"));
|
||||
curthread->td_critnest = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user