diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-12-05 11:48:58 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-12-12 14:19:05 -0800 |
commit | 5098462fbac60cbec76171a8b4998a36b85891a1 (patch) | |
tree | e9d6b62251ba4a670216f12390cc1ccad8148569 /net/tipc | |
parent | f3674384709b69c5cd8c4597b8bd73ea7bd0236f (diff) | |
parent | 150b567e0d572342ef08bace7ee7aff80fd75327 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR (net-6.13-rc3).
No conflicts or adjacent changes.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/udp_media.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c index b7e25e7e9933..108a4cc2e001 100644 --- a/net/tipc/udp_media.c +++ b/net/tipc/udp_media.c @@ -807,6 +807,7 @@ static void cleanup_bearer(struct work_struct *work) { struct udp_bearer *ub = container_of(work, struct udp_bearer, work); struct udp_replicast *rcast, *tmp; + struct tipc_net *tn; list_for_each_entry_safe(rcast, tmp, &ub->rcast.list, list) { dst_cache_destroy(&rcast->dst_cache); @@ -814,10 +815,14 @@ static void cleanup_bearer(struct work_struct *work) kfree_rcu(rcast, rcu); } + tn = tipc_net(sock_net(ub->ubsock->sk)); + dst_cache_destroy(&ub->rcast.dst_cache); udp_tunnel_sock_release(ub->ubsock); + + /* Note: could use a call_rcu() to avoid another synchronize_net() */ synchronize_net(); - atomic_dec(&tipc_net(sock_net(ub->ubsock->sk))->wq_count); + atomic_dec(&tn->wq_count); kfree(ub); } |