From: H. Peter Anvin Date: Fri, 23 Apr 2010 23:17:40 +0000 (-0700) Subject: x86-64: Clear a 64-bit FS/GS base on fork if selector is nonzero X-Git-Tag: v2.6.34-rc6~9^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ce5a2b9bb2e92902230e3121d8c3047fab9cb47;p=pandora-kernel.git x86-64: Clear a 64-bit FS/GS base on fork if selector is nonzero When we do a thread switch, we clear the outgoing FS/GS base if the corresponding selector is nonzero. This is taken by __switch_to() as an entry invariant; it does not verify that it is true on entry. However, copy_thread() doesn't enforce this constraint, which can result in inconsistent results after fork(). Make copy_thread() match the behavior of __switch_to(). Reported-and-tested-by: Samuel Thibault Signed-off-by: H. Peter Anvin LKML-Reference: <4BD1E061.8030605@zytor.com> Cc: --- Reading git-diff-tree failed