X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=net%2Fsysctl_net.c;h=53196009160a031ae4909fc5bc65e8ad098ef22c;hb=6b9d363c49d22395d0cf8729c5963f83cfbb6d69;hp=972201cd5fa76791be3d558252d3efb5b009f92e;hpb=8daf14cf56816303d64d1a705fcbc389211ba36e;p=karo-tx-linux.git diff --git a/net/sysctl_net.c b/net/sysctl_net.c index 972201cd5fa7..53196009160a 100644 --- a/net/sysctl_net.c +++ b/net/sysctl_net.c @@ -61,7 +61,7 @@ static struct ctl_table_root net_sysctl_root = { static int net_ctl_ro_header_perms(struct ctl_table_root *root, struct nsproxy *namespaces, struct ctl_table *table) { - if (namespaces->net_ns == &init_net) + if (net_eq(namespaces->net_ns, &init_net)) return table->mode; else return table->mode & ~0222; @@ -71,7 +71,7 @@ static struct ctl_table_root net_sysctl_ro_root = { .permissions = net_ctl_ro_header_perms, }; -static int sysctl_net_init(struct net *net) +static int __net_init sysctl_net_init(struct net *net) { setup_sysctl_set(&net->sysctls, &net_sysctl_ro_root.default_set, @@ -79,7 +79,7 @@ static int sysctl_net_init(struct net *net) return 0; } -static void sysctl_net_exit(struct net *net) +static void __net_exit sysctl_net_exit(struct net *net) { WARN_ON(!list_empty(&net->sysctls.list)); return;