Skip to content

Commit cdb3f7b

Browse files
committed
tgupdate: merge t/upstream base into t/upstream
2 parents 70c4578 + d33f190 commit cdb3f7b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

net/tipc/udp_media.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,17 +807,22 @@ static void cleanup_bearer(struct work_struct *work)
807807
{
808808
struct udp_bearer *ub = container_of(work, struct udp_bearer, work);
809809
struct udp_replicast *rcast, *tmp;
810+
struct tipc_net *tn;
810811

811812
list_for_each_entry_safe(rcast, tmp, &ub->rcast.list, list) {
812813
dst_cache_destroy(&rcast->dst_cache);
813814
list_del_rcu(&rcast->list);
814815
kfree_rcu(rcast, rcu);
815816
}
816817

818+
tn = tipc_net(sock_net(ub->ubsock->sk));
819+
817820
dst_cache_destroy(&ub->rcast.dst_cache);
818821
udp_tunnel_sock_release(ub->ubsock);
822+
823+
/* Note: could use a call_rcu() to avoid another synchronize_net() */
819824
synchronize_net();
820-
atomic_dec(&tipc_net(sock_net(ub->ubsock->sk))->wq_count);
825+
atomic_dec(&tn->wq_count);
821826
kfree(ub);
822827
}
823828

0 commit comments

Comments
 (0)