File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -811,17 +811,22 @@ static void cleanup_bearer(struct work_struct *work)
811811{
812812 struct udp_bearer * ub = container_of (work , struct udp_bearer , work );
813813 struct udp_replicast * rcast , * tmp ;
814+ struct tipc_net * tn ;
814815
815816 list_for_each_entry_safe (rcast , tmp , & ub -> rcast .list , list ) {
816817 dst_cache_destroy (& rcast -> dst_cache );
817818 list_del_rcu (& rcast -> list );
818819 kfree_rcu (rcast , rcu );
819820 }
820821
821- atomic_dec (& tipc_net (sock_net (ub -> ubsock -> sk ))-> wq_count );
822+ tn = tipc_net (sock_net (ub -> ubsock -> sk ));
823+
822824 dst_cache_destroy (& ub -> rcast .dst_cache );
823825 udp_tunnel_sock_release (ub -> ubsock );
826+
827+ /* Note: could use a call_rcu() to avoid another synchronize_net() */
824828 synchronize_net ();
829+ atomic_dec (& tn -> wq_count );
825830 kfree (ub );
826831}
827832
You can’t perform that action at this time.
0 commit comments