* [PATCH][net-next] netns: restore ops before calling ops_exit_list
@ 2019-06-20 11:24 Li RongQing
2019-06-20 11:27 ` Eric Dumazet
2019-06-22 23:56 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Li RongQing @ 2019-06-20 11:24 UTC (permalink / raw)
To: netdev, edumazet
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>
---
net/core/net_namespace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 @@ 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);
--
2.16.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH][net-next] netns: restore ops before calling ops_exit_list
2019-06-20 11:24 [PATCH][net-next] netns: restore ops before calling ops_exit_list Li RongQing
@ 2019-06-20 11:27 ` Eric Dumazet
2019-06-22 23:56 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2019-06-20 11:27 UTC (permalink / raw)
To: Li RongQing; +Cc: netdev
On Thu, Jun 20, 2019 at 7:24 AM Li RongQing <lirongqing@baidu.com> wrote:
>
> 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>
Thanks for fixing this :)
Reviewed-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH][net-next] netns: restore ops before calling ops_exit_list
2019-06-20 11:24 [PATCH][net-next] netns: restore ops before calling ops_exit_list Li RongQing
2019-06-20 11:27 ` Eric Dumazet
@ 2019-06-22 23:56 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-06-22 23:56 UTC (permalink / raw)
To: lirongqing; +Cc: netdev, edumazet
From: Li RongQing <lirongqing@baidu.com>
Date: Thu, 20 Jun 2019 19:24:40 +0800
> 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>
Applied, thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-22 23:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-20 11:24 [PATCH][net-next] netns: restore ops before calling ops_exit_list Li RongQing
2019-06-20 11:27 ` Eric Dumazet
2019-06-22 23:56 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).