[Devel] [PATCH RH7 08/32] Revert "ms/pidns: expose task pid_ns_for_children to userspace"
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Mon Jun 8 20:05:38 MSK 2020
This reverts commit edaecdb8adac2871e9d5afa0dd127d4a92a34162.
We switch from procfs ns-files to nsfs ones, so we will apply nsfs
version of the patch instead.
https://jira.sw.ru/browse/PSBM-102357
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
fs/proc/namespaces.c | 1 -
include/linux/proc_ns.h | 1 -
kernel/pid_namespace.c | 33 ---------------------------------
3 files changed, 35 deletions(-)
diff --git a/fs/proc/namespaces.c b/fs/proc/namespaces.c
index 280e90ecf105..6976ef6cb193 100644
--- a/fs/proc/namespaces.c
+++ b/fs/proc/namespaces.c
@@ -27,7 +27,6 @@ static const struct proc_ns_operations *ns_entries[] = {
#endif
#ifdef CONFIG_PID_NS
&pidns_operations,
- &pidns_for_children_operations,
#endif
#ifdef CONFIG_USER_NS
&userns_operations,
diff --git a/include/linux/proc_ns.h b/include/linux/proc_ns.h
index 8deba57cbb45..b8dc2bca2575 100644
--- a/include/linux/proc_ns.h
+++ b/include/linux/proc_ns.h
@@ -27,7 +27,6 @@ extern const struct proc_ns_operations netns_operations;
extern const struct proc_ns_operations utsns_operations;
extern const struct proc_ns_operations ipcns_operations;
extern const struct proc_ns_operations pidns_operations;
-extern const struct proc_ns_operations pidns_for_children_operations;
extern const struct proc_ns_operations userns_operations;
extern const struct proc_ns_operations mntns_operations;
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index 3728139e7e54..482b6c3e0143 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -355,29 +355,6 @@ static void *pidns_get(struct task_struct *task)
return ns;
}
-static void *pidns_for_children_get(struct task_struct *task)
-{
- struct pid_namespace *ns = NULL;
-
- task_lock(task);
- if (task->nsproxy) {
- ns = task->nsproxy->pid_ns;
- get_pid_ns(ns);
- }
- task_unlock(task);
-
- if (ns) {
- qread_lock(&tasklist_lock);
- if (!ns->child_reaper) {
- put_pid_ns(ns);
- ns = NULL;
- }
- qread_unlock(&tasklist_lock);
- }
-
- return ns;
-}
-
static void pidns_put(void *ns)
{
put_pid_ns(ns);
@@ -429,16 +406,6 @@ const struct proc_ns_operations pidns_operations = {
.inum = pidns_inum,
};
-const struct proc_ns_operations pidns_for_children_operations = {
- .name = "pid_for_children",
- .real_ns_name = "pid",
- .type = CLONE_NEWPID,
- .get = pidns_for_children_get,
- .put = pidns_put,
- .install = pidns_install,
- .inum = pidns_inum,
-};
-
static __init int pid_namespaces_init(void)
{
pid_ns_cachep = KMEM_CACHE(pid_namespace, SLAB_PANIC);
--
2.24.1
More information about the Devel
mailing list