mirror of https://github.com/torvalds/linux.git
ns: rename to exit_nsproxy_namespaces()
The current naming is very misleading as this really isn't exiting all of the task's namespaces. It is only exiting the namespaces that hang of off nsproxy. Reflect that in the name. Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-10-2e6f823ebdc0@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
6b053576ed
commit
4b06b70c82
|
|
@ -93,7 +93,7 @@ static inline struct cred *nsset_cred(struct nsset *set)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int copy_namespaces(u64 flags, struct task_struct *tsk);
|
int copy_namespaces(u64 flags, struct task_struct *tsk);
|
||||||
void exit_task_namespaces(struct task_struct *tsk);
|
void exit_nsproxy_namespaces(struct task_struct *tsk);
|
||||||
void switch_task_namespaces(struct task_struct *tsk, struct nsproxy *new);
|
void switch_task_namespaces(struct task_struct *tsk, struct nsproxy *new);
|
||||||
int exec_task_namespaces(void);
|
int exec_task_namespaces(void);
|
||||||
void free_nsproxy(struct nsproxy *ns);
|
void free_nsproxy(struct nsproxy *ns);
|
||||||
|
|
|
||||||
|
|
@ -1519,9 +1519,9 @@ static struct cgroup *current_cgns_cgroup_dfl(void)
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* NOTE: This function may be called from bpf_cgroup_from_id()
|
* NOTE: This function may be called from bpf_cgroup_from_id()
|
||||||
* on a task which has already passed exit_task_namespaces() and
|
* on a task which has already passed exit_nsproxy_namespaces()
|
||||||
* nsproxy == NULL. Fall back to cgrp_dfl_root which will make all
|
* and nsproxy == NULL. Fall back to cgrp_dfl_root which will
|
||||||
* cgroups visible for lookups.
|
* make all cgroups visible for lookups.
|
||||||
*/
|
*/
|
||||||
return &cgrp_dfl_root.cgrp;
|
return &cgrp_dfl_root.cgrp;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -962,7 +962,7 @@ void __noreturn do_exit(long code)
|
||||||
exit_fs(tsk);
|
exit_fs(tsk);
|
||||||
if (group_dead)
|
if (group_dead)
|
||||||
disassociate_ctty(1);
|
disassociate_ctty(1);
|
||||||
exit_task_namespaces(tsk);
|
exit_nsproxy_namespaces(tsk);
|
||||||
exit_task_work(tsk);
|
exit_task_work(tsk);
|
||||||
exit_thread(tsk);
|
exit_thread(tsk);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2453,7 +2453,7 @@ __latent_entropy struct task_struct *copy_process(
|
||||||
if (p->io_context)
|
if (p->io_context)
|
||||||
exit_io_context(p);
|
exit_io_context(p);
|
||||||
bad_fork_cleanup_namespaces:
|
bad_fork_cleanup_namespaces:
|
||||||
exit_task_namespaces(p);
|
exit_nsproxy_namespaces(p);
|
||||||
bad_fork_cleanup_mm:
|
bad_fork_cleanup_mm:
|
||||||
if (p->mm) {
|
if (p->mm) {
|
||||||
mm_clear_owner(p->mm, p);
|
mm_clear_owner(p->mm, p);
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,7 @@ void switch_task_namespaces(struct task_struct *p, struct nsproxy *new)
|
||||||
put_nsproxy(ns);
|
put_nsproxy(ns);
|
||||||
}
|
}
|
||||||
|
|
||||||
void exit_task_namespaces(struct task_struct *p)
|
void exit_nsproxy_namespaces(struct task_struct *p)
|
||||||
{
|
{
|
||||||
switch_task_namespaces(p, NULL);
|
switch_task_namespaces(p, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue