]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
exec: introduce struct task_exec_state
authorChristian Brauner (Amutable) <brauner@kernel.org>
Wed, 20 May 2026 21:48:53 +0000 (23:48 +0200)
committerChristian Brauner <brauner@kernel.org>
Tue, 26 May 2026 09:02:01 +0000 (11:02 +0200)
commitb092062cb6d799fa3504c5975cbb1b05c8b67d6d
tree922723600d09965b8458171e72843acecf165def
parent4f365e7a5d448dab7e0bb56ed32ff2bfddd134bd
exec: introduce struct task_exec_state

Introduce struct task_exec_state, a per-task RCU-protected structure
that holds the dumpable mode and the user namespace and stays attached
to the task for its full lifetime.

task_exec_state_rcu() is the canonical reader: asserts RCU or
task_lock is held, WARNs on a NULL state, returns the
rcu_dereference()'d pointer.

Reviewed-by: Jann Horn <jannh@google.com>
Link: https://patch.msgid.link/20260520-work-task_exec_state-v3-2-69f895bc1385@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
include/linux/sched.h
include/linux/sched/exec_state.h [new file with mode: 0644]
kernel/Makefile
kernel/exec_state.c [new file with mode: 0644]