Fixes a race condition where the kernel could see an interrupt occurring after the return_to_user code called by userinit resets the FS segment value, but before we have switched to user. This causes all TLS variables in the kernel to cause a crash on the next load. The fix mirrors the exit path code for syscalls better.
Fixes a race condition where the kernel could see an interrupt occurring after the return_to_user code called by userinit resets the FS segment value, but before we have switched to user. This causes all TLS variables in the kernel to cause a crash on the next load. The fix mirrors the exit path code for syscalls better.