projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'drm-fixes-3.14' of git://people.freedesktop.org/~agd5f/linux into drm...
[profile/ivi/kernel-x86-ivi.git]
/
net
/
sctp
/
sysctl.c
diff --git
a/net/sctp/sysctl.c
b/net/sctp/sysctl.c
index
7135e61
..
35c8923
100644
(file)
--- a/
net/sctp/sysctl.c
+++ b/
net/sctp/sysctl.c
@@
-151,6
+151,7
@@
static struct ctl_table sctp_net_table[] = {
},
{
.procname = "cookie_hmac_alg",
},
{
.procname = "cookie_hmac_alg",
+ .data = &init_net.sctp.sctp_hmac_alg,
.maxlen = 8,
.mode = 0644,
.proc_handler = proc_sctp_do_hmac_alg,
.maxlen = 8,
.mode = 0644,
.proc_handler = proc_sctp_do_hmac_alg,
@@
-401,15
+402,18
@@
static int proc_sctp_do_rto_max(struct ctl_table *ctl, int write,
int sctp_sysctl_net_register(struct net *net)
{
int sctp_sysctl_net_register(struct net *net)
{
- struct ctl_table *table;
- int i;
+ struct ctl_table *table = sctp_net_table;
+
+ if (!net_eq(net, &init_net)) {
+ int i;
- table = kmemdup(sctp_net_table, sizeof(sctp_net_table), GFP_KERNEL);
- if (!table)
- return -ENOMEM;
+
table = kmemdup(sctp_net_table, sizeof(sctp_net_table), GFP_KERNEL);
+
if (!table)
+
return -ENOMEM;
- for (i = 0; table[i].data; i++)
- table[i].data += (char *)(&net->sctp) - (char *)&init_net.sctp;
+ for (i = 0; table[i].data; i++)
+ table[i].data += (char *)(&net->sctp) - (char *)&init_net.sctp;
+ }
net->sctp.sysctl_header = register_net_sysctl(net, "net/sctp", table);
return 0;
net->sctp.sysctl_header = register_net_sysctl(net, "net/sctp", table);
return 0;