DragonFly commits List (threaded) for 2006-02
cvs commit: src/sys/i386/i386 sys_machdep.c vm_machdep.c
dillon 2006/02/28 10:30:22 PST
DragonFly src repository
sys/i386/i386 sys_machdep.c vm_machdep.c
Do not set the pcb_ext field until the private TSS has been completely
initialized, otherwise an interrupt can come along and preempt, then
attempt to restore using the incompletely initialized TSS.
Do not free the pcb_ext data until after we have switched back to
the common TSS, otherwise a blockage in kmem_free() may cause a
premature thread switch with the now invalid private TSS.
Do not depend on need_user_resched() to set a private TSS prior to returning
from a system call, it may optimize itself into a NOP and not actually set
the private TSS prior to our return to userland. Instead, active the
new private TSS manually by doing a forced thread switch to ourselves.
Reported-by: Sascha Wildner <saw@xxxxxxxxx>
Revision Changes Path
1.22 +9 -4 src/sys/i386/i386/sys_machdep.c
1.40 +9 -10 src/sys/i386/i386/vm_machdep.c