The commit is pushed to "branch-rh7-3.10.0-229.7.2-ovz" and will appear at 
https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.6.3
------>
commit 9a440f22380933dd3547de7d83c553924c6ce284
Author: Cyrill Gorcunov <gorcu...@virtuozzo.com>
Date:   Fri Aug 28 14:31:18 2015 +0400

    ve/vznetstat: Fix potential exit race
    
    When container is exiting another task may be doing operations
    with statistics incrementing/decrementing stat counter, which
    may lead to situation where counter is not zero, thus we don't
    zap @ve->stat member.
    
    Fix it by testing if the net is the last one belonging
    to a container.
    
    https://jira.sw.ru/browse/PSBM-35178
    
    Fixes: 505f8aacf95dce27fad66c90d4e1cd64adcb5432
    (ve/vznetstat: Don't destroy statistics until explicitly asked)
    
    Signed-off-by: Cyrill Gorcunov <gorcu...@virtuozzo.com>
    
    CC: Andrey Vagin <ava...@virtuozzo.com>
    CC: Vladimir Davydov <vdavy...@virtuozzo.com>
    CC: Konstantin Khorenko <khore...@virtuozzo.com>
    CC: Pavel Emelyanov <xe...@virtuozzo.com>
    CC: Igor Sukhih <i...@parallels.com>
---
 kernel/ve/vznetstat/vznetstat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/ve/vznetstat/vznetstat.c b/kernel/ve/vznetstat/vznetstat.c
index 9a25dea..99feafb 100644
--- a/kernel/ve/vznetstat/vznetstat.c
+++ b/kernel/ve/vznetstat/vznetstat.c
@@ -1098,7 +1098,7 @@ static void __net_exit net_exit_acct(struct net *net)
 
        if (ve->stat) {
                venet_acct_put_stat(ve->stat);
-               if (atomic_read(&ve->stat->users) == 0)
+               if (ve->ve_netns == net)
                        ve->stat = NULL;
        }
 }
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to