diff --git a/[refs] b/[refs] index ca5fa9d7cfed..bc85316cabbd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 024626e36d75fc8c6e32d50d4c68bfc3b8df5fdf +refs/heads/master: 790a35328991b01181ff5624bdb084053b6fac54 diff --git a/trunk/net/core/sysctl_net_core.c b/trunk/net/core/sysctl_net_core.c index 57a7eadb8551..dc4cf7dda9d1 100644 --- a/trunk/net/core/sysctl_net_core.c +++ b/trunk/net/core/sysctl_net_core.c @@ -167,8 +167,13 @@ static __net_init int sysctl_core_net_init(struct net *net) if (tbl == NULL) goto err_dup; - for (tmp = tbl; tmp->procname; tmp++) - tmp->mode &= ~0222; + for (tmp = tbl; tmp->procname; tmp++) { + if (tmp->data >= (void *)&init_net && + tmp->data < (void *)(&init_net + 1)) + tmp->data += (char *)net - (char *)&init_net; + else + tmp->mode &= ~0222; + } } net->sysctl_core_hdr = register_net_sysctl_table(net,