Commit 22a1f5140ed69baa5906ce9b2b9143478f5a4da0

Authored by wangweidong
Committed by David S. Miller
1 parent 0e0eee2465

sctp: fix a missed .data initialization

As commit 3c68198e75111a90("sctp: Make hmac algorithm selection for
 cookie generation dynamic"), we miss the .data initialization.
If we don't use the net_namespace, the problem that parts of the
sysctl configuration won't be isolation and won't occur.

In sctp_sysctl_net_register(), we register the sysctl for each
net, in the for(), we use the 'table[i].data' as check condition, so
when the 'i' is the index of sctp_hmac_alg, the data is NULL, then
break. So add the .data initialization.

Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

... ... @@ -151,6 +151,7 @@
151 151 },
152 152 {
153 153 .procname = "cookie_hmac_alg",
  154 + .data = &init_net.sctp.sctp_hmac_alg,
154 155 .maxlen = 8,
155 156 .mode = 0644,
156 157 .proc_handler = proc_sctp_do_hmac_alg,