Skip to content

rcu-tasks: Fix race against exiting pid_ns

Frederic Weisbecker lkml rcu 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3rcu-tasks: Improve comments explaining tasks_rcu_exit_srcu purposekernel/rcu/tasks.h+29 -80 replies
2/3rcu-tasks: Remove preemption disablement around srcu_read_[un]lock() callskernel/rcu/tasks.h+0 -40 replies
3/3rcu-tasks: Fix synchronize_rcu_tasks() VS zap_pid_ns_processes()include/linux/rcupdate.h kernel/pid_namespace.c kernel/rcu/tasks.h+31 -210 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] rcu-tasks: Fix race against exiting pid_ns

Pengfei Xu has reported a deadlock involving calls to unshare(), perf_event_open() and clone3() calls. It requires CAP_SYS_ADMIN to reproduce (at least I don't see a way for a non privilege process to reproduce).

See this thread for details: https://lore.kernel.org/all/[email protected]/
And this document for the collaborative analysis with Boqun, Paul and Neeraj:
https://docs.google.com/document/d/1hJxgiZ5TMZ4YJkdJPLAkRvq7sYQ-A7svgA8no6i-v8k

The two first patches are small improvements. The fix is in the last patch.

git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
rcu/dev

HEAD: 45ef5a0a4be4e0db9eadcc86e8f346d34c62e744

Thanks,
Frederic
---

Frederic Weisbecker (3):
rcu-tasks: Improve comments explaining tasks_rcu_exit_srcu purpose
rcu-tasks: Remove preemption disablement around srcu_read_[un]lock() calls
rcu-tasks: Fix synchronize_rcu_tasks() VS zap_pid_ns_processes()

 include/linux/rcupdate.h |  2 ++
 kernel/pid_namespace.c   | 17 +++++++++++++++
 kernel/rcu/tasks.h       | 55 ++++++++++++++++++++++++++++++++++++------------
 3 files changed, 60 insertions(+), 14 deletions(-)