Re: [Patch net] xfrm: destroy xfrm_state synchronously on net exit path

2019-01-30 Thread Cong Wang
On Tue, Jan 29, 2019 at 10:27 PM Cong Wang wrote: > diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c > index f5b4febeaa25..08bf374a80eb 100644 > --- a/net/ipv6/xfrm6_tunnel.c > +++ b/net/ipv6/xfrm6_tunnel.c > @@ -344,8 +344,7 @@ static void __net_exit xfrm6_tunnel_net_exit(struct net

[Patch net] xfrm: destroy xfrm_state synchronously on net exit path

2019-01-29 Thread Cong Wang
xfrm_state_put() moves struct xfrm_state to the GC list and schedules the GC work to clean it up. On net exit call path, xfrm_state_flush() is called to clean up and xfrm_flush_gc() is called to wait for the GC work to complete before exit. However, this doesn't work because one of the ->destructo