diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index c60123dff803912c398cb6fa9e25a08f326fd879..f4aacbb76fa51564d74b995b712296b1718a8951 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c @@ -149,8 +149,10 @@ static void ops_exit_list(const struct pernet_operations *ops, { struct net *net; if (ops->exit) { - list_for_each_entry(net, net_exit_list, exit_list) + list_for_each_entry(net, net_exit_list, exit_list) { ops->exit(net); + cond_resched(); + } } if (ops->exit_batch) ops->exit_batch(net_exit_list);