diff options
-rw-r--r-- | fs/proc/proc_sysctl.c | 4 | ||||
-rw-r--r-- | include/linux/sysctl.h | 1 | ||||
-rw-r--r-- | net/sysctl_net.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index f6aa75111b41..9d8223cd3655 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c | |||
@@ -1080,6 +1080,10 @@ void setup_sysctl_set(struct ctl_table_set *p, | |||
1080 | p->is_seen = is_seen; | 1080 | p->is_seen = is_seen; |
1081 | } | 1081 | } |
1082 | 1082 | ||
1083 | void retire_sysctl_set(struct ctl_table_set *set) | ||
1084 | { | ||
1085 | WARN_ON(!list_empty(&set->list)); | ||
1086 | } | ||
1083 | 1087 | ||
1084 | int __init proc_sys_init(void) | 1088 | int __init proc_sys_init(void) |
1085 | { | 1089 | { |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 08cabbfddacb..475ff0e35e63 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -1072,6 +1072,7 @@ void proc_sys_poll_notify(struct ctl_table_poll *poll); | |||
1072 | extern void setup_sysctl_set(struct ctl_table_set *p, | 1072 | extern void setup_sysctl_set(struct ctl_table_set *p, |
1073 | struct ctl_table_set *parent, | 1073 | struct ctl_table_set *parent, |
1074 | int (*is_seen)(struct ctl_table_set *)); | 1074 | int (*is_seen)(struct ctl_table_set *)); |
1075 | extern void retire_sysctl_set(struct ctl_table_set *set); | ||
1075 | 1076 | ||
1076 | void register_sysctl_root(struct ctl_table_root *root); | 1077 | void register_sysctl_root(struct ctl_table_root *root); |
1077 | struct ctl_table_header *__register_sysctl_paths( | 1078 | struct ctl_table_header *__register_sysctl_paths( |
diff --git a/net/sysctl_net.c b/net/sysctl_net.c index a6bbee2bc710..ffd67a6515a3 100644 --- a/net/sysctl_net.c +++ b/net/sysctl_net.c | |||
@@ -82,7 +82,7 @@ static int __net_init sysctl_net_init(struct net *net) | |||
82 | 82 | ||
83 | static void __net_exit sysctl_net_exit(struct net *net) | 83 | static void __net_exit sysctl_net_exit(struct net *net) |
84 | { | 84 | { |
85 | WARN_ON(!list_empty(&net->sysctls.list)); | 85 | retire_sysctl_set(&net->sysctls); |
86 | } | 86 | } |
87 | 87 | ||
88 | static struct pernet_operations sysctl_pernet_ops = { | 88 | static struct pernet_operations sysctl_pernet_ops = { |