Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15605b33 authored by Li RongQing's avatar Li RongQing Committed by Greg Kroah-Hartman
Browse files

netns: restore ops before calling ops_exit_list



commit b272a0ad730103e84fb735fd0a8cc050cdf7f77c upstream.

ops has been iterated to first element when call pre_exit, and
it needs to restore from save_ops, not save ops to save_ops

Fixes: d7d99872c144 ("netns: add pre_exit method to struct pernet_operations")
Signed-off-by: default avatarLi RongQing <lirongqing@baidu.com>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e70c0b7e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -357,7 +357,7 @@ static __net_init int setup_net(struct net *net, struct user_namespace *user_ns)

	synchronize_rcu();

	saved_ops = ops;
	ops = saved_ops;
	list_for_each_entry_continue_reverse(ops, &pernet_list, list)
		ops_exit_list(ops, &net_exit_list);