On Fri, Jul 24, 2015 at 06:26:29PM +0300, Cyrill Gorcunov wrote:
> On Fri, Jul 24, 2015 at 06:21:36PM +0300, Vladimir Davydov wrote:
> > On Fri, Jul 24, 2015 at 06:10:10PM +0300, Cyrill Gorcunov wrote:
> > 
> > > @@ -1098,10 +1098,8 @@ static void __net_exit net_exit_acct(str
> > >  
> > >   if (ve->stat) {
> > >           venet_acct_put_stat(ve->stat);
> > > -         if (atomic_read(&ve->stat->users) == 0) {
> > 
> > Is there any point in checking this?
> 
> Yes. There might be several several nets.

Hmm, correct. Then you'd better check this explicitly:

        if (ve->ve_netns == net)
                ...

Otherwise, you can omit clearing ve->stat if you race with e.g.
VZCTL_TC_CLEAR_STAT, which also increments/decrements ->users.
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to