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 @@ -803,17 +803,22 @@ static void cleanup_bearer(struct work_struct *work)
803803{
804804 struct udp_bearer * ub = container_of (work , struct udp_bearer , work );
805805 struct udp_replicast * rcast , * tmp ;
806+ struct tipc_net * tn ;
806807
807808 list_for_each_entry_safe (rcast , tmp , & ub -> rcast .list , list ) {
808809 dst_cache_destroy (& rcast -> dst_cache );
809810 list_del_rcu (& rcast -> list );
810811 kfree_rcu (rcast , rcu );
811812 }
812813
814+ tn = tipc_net (sock_net (ub -> ubsock -> sk ));
815+
813816 dst_cache_destroy (& ub -> rcast .dst_cache );
814817 udp_tunnel_sock_release (ub -> ubsock );
818+
819+ /* Note: could use a call_rcu() to avoid another synchronize_net() */
815820 synchronize_net ();
816- atomic_dec (& tipc_net ( sock_net ( ub -> ubsock -> sk )) -> wq_count );
821+ atomic_dec (& tn -> wq_count );
817822 kfree (ub );
818823}
819824
You can’t perform that action at this time.
0 commit comments