[ovs-dev] [PATCH] ovs-thread: Fix memory leak in thread exit.

Ben Pfaff blp at ovn.org
Tue Nov 10 22:11:05 UTC 2015


OK, I give up.  There seems to be no rhyme or reason to why the list
drops my emails.

I'll push this, with the proper commit message and acks and whatever.

On Tue, Nov 10, 2015 at 02:05:17PM -0800, Ben Pfaff wrote:
> I'd ordinarily say that, but this is the second patch I've been unable
> to post to the list in a normal way.  They just disappear into the great
> bit bucket in the mailing list somewhere and never appear.  If that
> keeps happening it's going to cripple my development.
> 
> On Tue, Nov 10, 2015 at 02:01:09PM -0800, Jarno Rajahalme wrote:
> > Let’s cut this off before it gets totally out of hand :-)
> > 
> >   Jarno
> > 
> > Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>
> > 
> > > On Nov 10, 2015, at 1:59 PM, Ben Pfaff <blp at ovn.org> wrote:
> > > 
> > > Maybe email addresses are the problem?  I'll try a signed-off-by without
> > > an "at" or angle brackets:
> > > 
> > > Signed-off-by: Ben Pfaff (blp at ovn.org)
> > > 
> > > On Tue, Nov 10, 2015 at 01:55:09PM -0800, Ben Pfaff wrote:
> > >> OK, that got through, what about:
> > >> 
> > >>    Reported-at: https://github.com/openvswitch/ovs/pull/87
> > >> 
> > >> On Tue, Nov 10, 2015 at 01:54:30PM -0800, Ben Pfaff wrote:
> > >>> There was supposed to be a commit message with this, but when I include
> > >>> it the list refuses to post it.  Let's try part of it again, to narrow
> > >>> it down:
> > >>> 
> > >>>    'n' is the number of keys, which are grouped into blocks of L2_SIZE
> > >>>    indexes.  Even if only one key in a block is allocated, the whole block has
> > >>>    a pointer to it that must be freed.  Thus, we need to round up instead of
> > >>>    down.
> > >>> 
> > >>> On Tue, Nov 10, 2015 at 01:50:58PM -0800, Ben Pfaff wrote:
> > >>>> diff --git a/lib/ovs-thread.c b/lib/ovs-thread.c
> > >>>> index 88b92d1..2f6bc58 100644
> > >>>> --- a/lib/ovs-thread.c
> > >>>> +++ b/lib/ovs-thread.c
> > >>>> @@ -665,7 +665,7 @@ ovsthread_key_destruct__(void *slots_)
> > >>>>     n = n_keys;
> > >>>>     ovs_mutex_unlock(&key_mutex);
> > >>>> 
> > >>>> -    for (i = 0; i < n / L2_SIZE; i++) {
> > >>>> +    for (i = 0; i < DIV_ROUND_UP(n, L2_SIZE); i++) {
> > >>>>         free(slots->p1[i]);
> > >>>>     }
> > >>>>     free(slots);
> > >>>> -- 
> > >>>> 2.1.3
> > >>>> 
> > > _______________________________________________
> > > dev mailing list
> > > dev at openvswitch.org
> > > http://openvswitch.org/mailman/listinfo/dev
> > 



More information about the dev mailing list