[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230726140635.2059334-13-j.granados@samsung.com>
Date: Wed, 26 Jul 2023 16:06:32 +0200
From: Joel Granados <j.granados@...sung.com>
To: mcgrof@...nel.org, David Ahern <dsahern@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: willy@...radead.org, keescook@...omium.org, josh@...htriplett.org,
Joel Granados <j.granados@...sung.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 12/14] vrf: Update to register_net_sysctl_sz
This is part of the effort to remove the sentinel (last empty) element
from the ctl_table arrays. We update to the new function and pass it the
array size.
Signed-off-by: Joel Granados <j.granados@...sung.com>
---
drivers/net/vrf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index bdb3a76a352e..f4c3df15a0e5 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -1979,7 +1979,8 @@ static int vrf_netns_init_sysctl(struct net *net, struct netns_vrf *nn_vrf)
/* init the extra1 parameter with the reference to current netns */
table[0].extra1 = net;
- nn_vrf->ctl_hdr = register_net_sysctl(net, "net/vrf", table);
+ nn_vrf->ctl_hdr = register_net_sysctl_sz(net, "net/vrf", table,
+ ARRAY_SIZE(vrf_table));
if (!nn_vrf->ctl_hdr) {
kfree(table);
return -ENOMEM;
--
2.30.2
Powered by blists - more mailing lists