OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ababae4
)
selftests/x86: Add a fork() to entry_from_vm86 to catch fork bugs
author
Andy Lutomirski
<luto@kernel.org>
Sat, 31 Oct 2015 05:42:45 +0000
(22:42 -0700)
committer
Thomas Gleixner
<tglx@linutronix.de>
Sat, 31 Oct 2015 08:50:25 +0000
(09:50 +0100)
Mere possession of vm86 state is strange. Make sure that nothing
gets corrupted if we fork after calling vm86().
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Stas Sergeev <stsp@list.ru>
Link:
http://lkml.kernel.org/r/08f83295460a80e41dc5e3e81ec40d6844d316f5.1446270067.git.luto@kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
tools/testing/selftests/x86/entry_from_vm86.c
patch
|
blob
|
history
diff --git
a/tools/testing/selftests/x86/entry_from_vm86.c
b/tools/testing/selftests/x86/entry_from_vm86.c
index
421c607
..
d075ea0
100644
(file)
--- a/
tools/testing/selftests/x86/entry_from_vm86.c
+++ b/
tools/testing/selftests/x86/entry_from_vm86.c
@@
-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);
}