diff options
author | Li RongQing <lirongqing@baidu.com> | 2019-06-20 19:24:40 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-09-12 11:02:55 +0200 |
commit | 15605b333ddaa3e5e21dfebb65546c70bb167925 (patch) | |
tree | 377ee23f450db55f5cec734a82b98e52ed8b774c | |
parent | e70c0b7e280415e1511fb258f4b72733d765b80e (diff) |
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: Li RongQing <lirongqing@baidu.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/core/net_namespace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index a98b5f27b491..a7105645ccfc 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c @@ -357,7 +357,7 @@ out_undo: 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); |