[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231026094106.1505892-2-razor@blackwall.org>
Date: Thu, 26 Oct 2023 12:41:05 +0300
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: bpf@...r.kernel.org
Cc: jiri@...nulli.us,
netdev@...r.kernel.org,
martin.lau@...ux.dev,
ast@...nel.org,
andrii@...nel.org,
john.fastabend@...il.com,
kuba@...nel.org,
andrew@...n.ch,
toke@...nel.org,
toke@...hat.com,
sdf@...gle.com,
daniel@...earbox.net,
Nikolay Aleksandrov <razor@...ckwall.org>
Subject: [PATCH bpf-next 1/2] netkit: remove explicit active/peer ptr initialization
Remove the explicit NULLing of active/peer pointers and rely on the
implicit one done at net device allocation.
Suggested-by: Jiri Pirko <jiri@...nulli.us>
Signed-off-by: Nikolay Aleksandrov <razor@...ckwall.org>
---
drivers/net/netkit.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/netkit.c b/drivers/net/netkit.c
index 7e484f9fd3ae..5a0f86f38f09 100644
--- a/drivers/net/netkit.c
+++ b/drivers/net/netkit.c
@@ -371,8 +371,6 @@ static int netkit_new_link(struct net *src_net, struct net_device *dev,
nk->policy = default_peer;
nk->mode = mode;
bpf_mprog_bundle_init(&nk->bundle);
- RCU_INIT_POINTER(nk->active, NULL);
- RCU_INIT_POINTER(nk->peer, NULL);
err = register_netdevice(peer);
put_net(net);
@@ -398,8 +396,6 @@ static int netkit_new_link(struct net *src_net, struct net_device *dev,
nk->policy = default_prim;
nk->mode = mode;
bpf_mprog_bundle_init(&nk->bundle);
- RCU_INIT_POINTER(nk->active, NULL);
- RCU_INIT_POINTER(nk->peer, NULL);
err = register_netdevice(dev);
if (err < 0)
--
2.38.1
Powered by blists - more mailing lists