mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
selftests/x86: Add a fork() to entry_from_vm86 to catch fork bugs
Mere possession of vm86 state is strange. Make sure that nothing gets corrupted if we fork after calling vm86(). Signed-off-by: Andy Lutomirski <[email protected]> Cc: Brian Gerst <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Stas Sergeev <[email protected]> Link: http://lkml.kernel.org/r/08f83295460a80e41dc5e3e81ec40d6844d316f5.1446270067.git.luto@kernel.org Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
ababae4410
commit
226f1f729c
1 changed files with 4 additions and 0 deletions
|
|
@ -230,5 +230,9 @@ int main(void)
|
|||
}
|
||||
clearhandler(SIGSEGV);
|
||||
|
||||
/* Make sure nothing explodes if we fork. */
|
||||
if (fork() > 0)
|
||||
return 0;
|
||||
|
||||
return (nerrs == 0 ? 0 : 1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue