]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: fix a missed .data initialization
authorwangweidong <wangweidong1@huawei.com>
Wed, 12 Feb 2014 01:44:43 +0000 (09:44 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Feb 2014 22:08:29 +0000 (17:08 -0500)
commit783fa85f4d70d77c3e47e55a7f83829e40e3b50b
treefad559ed9ca469c2bea6bbd982cbc76ce784cb90
parentbf61a19cfbe0e77fd5082ce486f86b0887acf14a
sctp: fix a missed .data initialization

As commit 2dea3bd57de63775("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>
net/sctp/sysctl.c