aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/tipc
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2024-12-19 11:59:43 +1000
committerDave Airlie <airlied@redhat.com>2024-12-19 12:00:02 +1000
commit38e961097e04e7adfe1d3335e3371e97c1723064 (patch)
tree40ffe2d6d45d668ed42fa28c270760f8967fcfba /net/tipc
parentMerge tag 'drm-intel-gt-next-2024-12-18' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next (diff)
parentLinux 6.13-rc3 (diff)
downloadwireguard-linux-38e961097e04e7adfe1d3335e3371e97c1723064.tar.xz
wireguard-linux-38e961097e04e7adfe1d3335e3371e97c1723064.zip
Merge tag 'v6.13-rc3' into drm-next
Backmerge linux 6.13-rc3 as amd next has some dependencies on fixes in it. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/udp_media.c7
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);
}