diff options
| author | Nikolay Aleksandrov <[email protected]> | 2023-10-26 09:41:05 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2023-10-26 13:58:39 +0000 |
| commit | ea41b880cc85f0a992571f66e4554a69f7806246 (patch) | |
| tree | 4da532cc1563b5b01e1b792438edcd0cbc7301d8 /drivers/net/netkit.c | |
| parent | selftests/bpf: Fix selftests broken by mitigations=off (diff) | |
| download | kernel-ea41b880cc85f0a992571f66e4554a69f7806246.tar.gz kernel-ea41b880cc85f0a992571f66e4554a69f7806246.zip | |
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 <[email protected]>
Signed-off-by: Nikolay Aleksandrov <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Reviewed-by: Jiri Pirko <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'drivers/net/netkit.c')
| -rw-r--r-- | drivers/net/netkit.c | 4 |
1 files changed, 0 insertions, 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) |
