History

Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull rseq fixes from Ingo Molnar: "Two rseq bugfixes: - CLONE_VM !CLONE_THREAD didn't work properly, the kernel would end up corrupting the TLS of the parent. Technically a change in the ABI but the previous behavior couldn't resonably have been relied on by applications so this looks like a valid exception to the ABI rule. - Make the RSEQ_FLAG_UNREGISTER ABI behavior consistent with the handling of other flags. This is not thought to impact any applications either" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: rseq: Unregister rseq for clone CLONE_VM rseq: Reject unknown flags on rseq unregister

Linus Torvalds committed 6 years ago

Commit ba0f4722 parents 8cac899 463f5502 files · +4 −2Browse files

Showing the changes to kernel (1 of 2 files). Show all

Unified · Split

kernel/rseq.c+2−0
@@ -310,6 +310,8 @@ SYSCALL_DEFINE4(rseq, struct rseq __user *, rseq, u32, rseq_len, · 309 unmodified lines
310 int ret;310 int ret;
311 311
312 if (flags & RSEQ_FLAG_UNREGISTER) {312 if (flags & RSEQ_FLAG_UNREGISTER) {
313 if (flags & ~RSEQ_FLAG_UNREGISTER)
314 return -EINVAL;
313 /* Unregister rseq for current thread. */315 /* Unregister rseq for current thread. */
314 if (current->rseq != rseq || !current->rseq)316 if (current->rseq != rseq || !current->rseq)
315 return -EINVAL;317 return -EINVAL;