diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c index 73e461dc12d7b4..3f5a12b85b2d3e 100644 --- a/net/tipc/udp_media.c +++ b/net/tipc/udp_media.c @@ -818,10 +818,10 @@ static void cleanup_bearer(struct work_struct *work) kfree_rcu(rcast, rcu); } - atomic_dec(&tipc_net(sock_net(ub->ubsock->sk))->wq_count); dst_cache_destroy(&ub->rcast.dst_cache); udp_tunnel_sock_release(ub->ubsock); synchronize_net(); + atomic_dec(&tipc_net(sock_net(ub->ubsock->sk))->wq_count); kfree(ub); }