mirror of
https://github.com/VIKINGYFY/immortalwrt.git
synced 2025-12-17 09:35:14 +00:00
39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
From ea41b880cc85f0a992571f66e4554a69f7806246 Mon Sep 17 00:00:00 2001
|
|
From: Nikolay Aleksandrov <razor@blackwall.org>
|
|
Date: Thu, 26 Oct 2023 12:41:05 +0300
|
|
Subject: [PATCH] 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@resnulli.us>
|
|
Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
|
|
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
|
|
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
|
|
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
|
|
Link: https://lore.kernel.org/bpf/20231026094106.1505892-2-razor@blackwall.org
|
|
---
|
|
drivers/net/netkit.c | 4 ----
|
|
1 file changed, 4 deletions(-)
|
|
|
|
--- a/drivers/net/netkit.c
|
|
+++ b/drivers/net/netkit.c
|
|
@@ -371,8 +371,6 @@ static int netkit_new_link(struct net *s
|
|
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 *s
|
|
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)
|