summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/proc/Kconfig4
-rw-r--r--fs/proc/array.c4
-rw-r--r--fs/proc/base.c2
-rw-r--r--init/Kconfig1
4 files changed, 8 insertions, 3 deletions
diff --git a/fs/proc/Kconfig b/fs/proc/Kconfig
index 2183fcf41d59..d751fcb637bb 100644
--- a/fs/proc/Kconfig
+++ b/fs/proc/Kconfig
@@ -71,3 +71,7 @@ config PROC_PAGE_MONITOR
71 /proc/pid/smaps, /proc/pid/clear_refs, /proc/pid/pagemap, 71 /proc/pid/smaps, /proc/pid/clear_refs, /proc/pid/pagemap,
72 /proc/kpagecount, and /proc/kpageflags. Disabling these 72 /proc/kpagecount, and /proc/kpageflags. Disabling these
73 interfaces will reduce the size of the kernel by approximately 4kb. 73 interfaces will reduce the size of the kernel by approximately 4kb.
74
75config PROC_CHILDREN
76 bool "Include /proc/<pid>/task/<tid>/children file"
77 default n
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 3f57dac31ba6..ce065cf3104f 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -577,7 +577,7 @@ int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
577 return 0; 577 return 0;
578} 578}
579 579
580#ifdef CONFIG_CHECKPOINT_RESTORE 580#ifdef CONFIG_PROC_CHILDREN
581static struct pid * 581static struct pid *
582get_children_pid(struct inode *inode, struct pid *pid_prev, loff_t pos) 582get_children_pid(struct inode *inode, struct pid *pid_prev, loff_t pos)
583{ 583{
@@ -700,4 +700,4 @@ const struct file_operations proc_tid_children_operations = {
700 .llseek = seq_lseek, 700 .llseek = seq_lseek,
701 .release = children_seq_release, 701 .release = children_seq_release,
702}; 702};
703#endif /* CONFIG_CHECKPOINT_RESTORE */ 703#endif /* CONFIG_PROC_CHILDREN */
diff --git a/fs/proc/base.c b/fs/proc/base.c
index bd7a9affc14b..1d540b3f226f 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -3109,7 +3109,7 @@ static const struct pid_entry tid_base_stuff[] = {
3109 ONE("stat", S_IRUGO, proc_tid_stat), 3109 ONE("stat", S_IRUGO, proc_tid_stat),
3110 ONE("statm", S_IRUGO, proc_pid_statm), 3110 ONE("statm", S_IRUGO, proc_pid_statm),
3111 REG("maps", S_IRUGO, proc_tid_maps_operations), 3111 REG("maps", S_IRUGO, proc_tid_maps_operations),
3112#ifdef CONFIG_CHECKPOINT_RESTORE 3112#ifdef CONFIG_PROC_CHILDREN
3113 REG("children", S_IRUGO, proc_tid_children_operations), 3113 REG("children", S_IRUGO, proc_tid_children_operations),
3114#endif 3114#endif
3115#ifdef CONFIG_NUMA 3115#ifdef CONFIG_NUMA
diff --git a/init/Kconfig b/init/Kconfig
index b999fa381bf9..6a930b7494ef 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1131,6 +1131,7 @@ endif # CGROUPS
1131 1131
1132config CHECKPOINT_RESTORE 1132config CHECKPOINT_RESTORE
1133 bool "Checkpoint/restore support" if EXPERT 1133 bool "Checkpoint/restore support" if EXPERT
1134 select PROC_CHILDREN
1134 default n 1135 default n
1135 help 1136 help
1136 Enables additional kernel features in a sake of checkpoint/restore. 1137 Enables additional kernel features in a sake of checkpoint/restore.