The commit is pushed to "branch-rh7-3.10.0-1160.31.1.vz7.181.x-ovz" and will 
appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1160.31.1.vz7.181.3
------>
commit bf967f76b9b2b4092d444bc2b9eaea82859295fc
Author: Vasily Averin <[email protected]>
Date:   Tue Jun 15 16:05:46 2021 +0300

    ms/xfrm: Fix warning in xfrm6_tunnel_net_exit.
    
    We need to make sure that all states are really deleted
    before we check that the state lists are empty. Otherwise
    we trigger a warning.
    
    Fixes: baeb0dbbb5659 ("xfrm6_tunnel: exit_net cleanup check added")
    Reported-and-tested-by:[email protected]
    Signed-off-by: Steffen Klassert <[email protected]>
    (cherry picked from ms commit b48c05ab5d32af2af4bc63851c153782d1c6ba42)
    VvS: reworked to use old version of xfrm_state_flush() call
         also dropped creation of xfrm_flush_gc()
    https://jira.sw.ru/browse/PSBM-130602
    Signed-off-by: Vasily Averin <[email protected]>
---
 net/ipv6/xfrm6_tunnel.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c
index 39ab663..8a01384 100644
--- a/net/ipv6/xfrm6_tunnel.c
+++ b/net/ipv6/xfrm6_tunnel.c
@@ -342,8 +342,15 @@ static int __net_init xfrm6_tunnel_net_init(struct net 
*net)
 static void __net_exit xfrm6_tunnel_net_exit(struct net *net)
 {
        struct xfrm6_tunnel_net *xfrm6_tn = xfrm6_tunnel_pernet(net);
+       struct xfrm_audit audit_info;
        unsigned int i;
 
+       audit_info.loginuid = INVALID_UID;
+       audit_info.sessionid = (unsigned int)-1;
+       audit_info.secid = 0;
+       xfrm_state_flush(net, IPSEC_PROTO_ANY, &audit_info);
+       flush_work(&net->xfrm.state_gc_work);
+
        for (i = 0; i < XFRM6_TUNNEL_SPI_BYADDR_HSIZE; i++)
                WARN_ON_ONCE(!hlist_empty(&xfrm6_tn->spi_byaddr[i]));
 
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to