summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorJérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>2026-08-11 19:10:11 +0000
committerChristian Brauner <brauner@kernel.org>2026-08-12 12:56:30 +0200
commitb64a9f67e082e04835ddd69d422a25168d69375b (patch)
tree66860d191c2ba5e301f81d36536be858d48bd36b /tools/perf/scripts/python/bin
parent86bcfe2e37cee93bb495ecd3238116ffd21183e9 (diff)
pid: reject allocations through dead ancestor pid namespaces
alloc_pid() checks PIDNS_ADDING only on the leaf pid namespace before making a new struct pid visible in every ancestor namespace. That is insufficient when an unborn descendant pid namespace outlives an ancestor whose init task has already exited. The descendant can still be initialized later through setns(), and the new pid is then published into the dead ancestor as well. Keep the existing ENOMEM behavior, but require PIDNS_ADDING to be set in every namespace that will receive the new pid before publishing any of them. This preserves the invariant that free_pid() never decrements pid_allocated in a namespace whose child_reaper is no longer live. Fixes: a3bdc23ba8ea ("pid_namespace: allow opening pid_for_children before init was created") Signed-off-by: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr> Reviewed-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions