aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/net_namespace.c
diff options
context:
space:
mode:
authorLi RongQing <lirongqing@baidu.com>2019-06-20 19:24:40 +0800
committerDavid S. Miller <davem@davemloft.net>2019-06-22 16:55:36 -0700
commitb272a0ad730103e84fb735fd0a8cc050cdf7f77c (patch)
treec336e6cab223986760b3ca4a6b52b93444865fcd /net/core/net_namespace.c
parentipv6: Error when route does not have any valid nexthops (diff)
downloadlinux-dev-b272a0ad730103e84fb735fd0a8cc050cdf7f77c.tar.xz
linux-dev-b272a0ad730103e84fb735fd0a8cc050cdf7f77c.zip
netns: restore ops before calling ops_exit_list
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>
Diffstat (limited to 'net/core/net_namespace.c')
-rw-r--r--net/core/net_namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 89dc99a28978..198ce503ae73 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -345,7 +345,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);