File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -750,7 +750,28 @@ static struct rtnl_link_ops xfrmi_link_ops __read_mostly = {
750
750
.get_link_net = xfrmi_get_link_net ,
751
751
};
752
752
753
+ static void __net_exit xfrmi_exit_batch_net (struct list_head * net_exit_list )
754
+ {
755
+ struct net * net ;
756
+ LIST_HEAD (list );
757
+
758
+ rtnl_lock ();
759
+ list_for_each_entry (net , net_exit_list , exit_list ) {
760
+ struct xfrmi_net * xfrmn = net_generic (net , xfrmi_net_id );
761
+ struct xfrm_if __rcu * * xip ;
762
+ struct xfrm_if * xi ;
763
+
764
+ for (xip = & xfrmn -> xfrmi [0 ];
765
+ (xi = rtnl_dereference (* xip )) != NULL ;
766
+ xip = & xi -> next )
767
+ unregister_netdevice_queue (xi -> dev , & list );
768
+ }
769
+ unregister_netdevice_many (& list );
770
+ rtnl_unlock ();
771
+ }
772
+
753
773
static struct pernet_operations xfrmi_net_ops = {
774
+ .exit_batch = xfrmi_exit_batch_net ,
754
775
.id = & xfrmi_net_id ,
755
776
.size = sizeof (struct xfrmi_net ),
756
777
};
You can’t perform that action at this time.
0 commit comments