Fix a race in user_ldt_free() against an interrupt (which attempts to
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 22 Apr 2004 03:39:43 +0000 (03:39 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 22 Apr 2004 03:39:43 +0000 (03:39 +0000)
commitcf4e130b72902adf6d8e852d68a51c91cd046c8d
tree2b5b82f66c09a36750583c15444231a88b25b453
parent6155eec44d9c70a06d74affd149a1ce05c231197
Fix a race in user_ldt_free() against an interrupt (which attempts to
save and restore the ldt) while it is being freed.  Reorder the free and use
a critical section to prevent the race.

Reported-by: Andrew Atrens <atrens@nortelnetworks.com>
sys/i386/i386/sys_machdep.c
sys/platform/pc32/i386/sys_machdep.c