[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1392169484-8256-2-git-send-email-wangweidong1@huawei.com>
Date: Wed, 12 Feb 2014 09:44:43 +0800
From: Wang Weidong <wangweidong1@...wei.com>
To: <nhorman@...driver.com>, <davem@...emloft.net>,
<vyasevich@...il.com>
CC: <dborkman@...hat.com>, <sergei.shtylyov@...entembedded.com>,
<netdev@...r.kernel.org>
Subject: [PATCH v3 1/2] 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@...driver.com>
Signed-off-by: Wang Weidong <wangweidong1@...wei.com>
---
net/sctp/sysctl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index 7135e61..d354de5 100644
--- 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",
+ .data = &init_net.sctp.sctp_hmac_alg,
.maxlen = 8,
.mode = 0644,
.proc_handler = proc_sctp_do_hmac_alg,
--
1.7.12
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists