Considering that we explicitly forbid system calls in rseq critical
sections, it is not valid to issue a fork or clone system call within a
rseq critical section, so rseq_fork() is not required to restart an
active rseq c.s. in the child process.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoy...@efficios.com>
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: Joel Fernandes <joe...@google.com>
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Catalin Marinas <catalin.mari...@arm.com>
Cc: Dave Watson <davejwat...@fb.com>
Cc: Will Deacon <will.dea...@arm.com>
Cc: Shuah Khan <shua...@osg.samsung.com>
Cc: Andi Kleen <a...@firstfloor.org>
Cc: linux-kselft...@vger.kernel.org
Cc: "H . Peter Anvin" <h...@zytor.com>
Cc: Chris Lameter <c...@linux.com>
Cc: Russell King <li...@arm.linux.org.uk>
Cc: Michael Kerrisk <mtk.manpa...@gmail.com>
Cc: "Paul E . McKenney" <paul...@linux.vnet.ibm.com>
Cc: Paul Turner <p...@google.com>
Cc: Boqun Feng <boqun.f...@gmail.com>
Cc: Josh Triplett <j...@joshtriplett.org>
Cc: Steven Rostedt <rost...@goodmis.org>
Cc: Ben Maurer <bmau...@fb.com>
Cc: linux-...@vger.kernel.org
Cc: Andy Lutomirski <l...@amacapital.net>
Cc: Andrew Morton <a...@linux-foundation.org>
Cc: Linus Torvalds <torva...@linux-foundation.org>
---
 include/linux/sched.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 87bf02d93a27..c1882643d455 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1831,9 +1831,7 @@ static inline void rseq_migrate(struct task_struct *t)
 
 /*
  * If parent process has a registered restartable sequences area, the
- * child inherits. Only applies when forking a process, not a thread. In
- * case a parent fork() in the middle of a restartable sequence, set the
- * resume notifier to force the child to retry.
+ * child inherits. Only applies when forking a process, not a thread.
  */
 static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags)
 {
@@ -1847,7 +1845,6 @@ static inline void rseq_fork(struct task_struct *t, 
unsigned long clone_flags)
                t->rseq_len = current->rseq_len;
                t->rseq_sig = current->rseq_sig;
                t->rseq_event_mask = current->rseq_event_mask;
-               rseq_preempt(t);
        }
 }
 
-- 
2.11.0

Reply via email to