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 @@ -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
You can’t perform that action at this time.
0 commit comments