[ovs-dev] [branch-1.11] ofproto-dpif: Fix memory leak in handle_flow_miss().
Ben Pfaff
blp at nicira.com
Tue Aug 20 07:01:32 UTC 2013
On Aug 19, 2013 11:35 PM, "Justin Pettit" <jpettit at nicira.com> wrote:
>
> Great catch. Also, very cool with sleuthing with your malloc histogram
(as discussed off-list).
Thanks.
Did you look around to make sure that I didn't somehow overlook a free call
somewhere? This patch "feels right" but obviously it needs to be more than
a feeling.
> Do you think it's worth mentioning in the comment describing
xlate_actions()?
Good idea.
> Acked-by: Justin Pettit <jpettit at nicira.com>
>
> --Justin
>
>
> On Aug 19, 2013, at 10:46 PM, Ben Pfaff <blp at nicira.com> wrote:
>
> > Every xlate_actions() needs a corresponding xlate_out_uninit(), but the
> > call in handle_flow_miss() lacked one. struct xlate_out has a built-in
> > 256-byte actions stub, so the bug only showed up for lots of actions.
> >
> > Bug #19198.
> > Reported-by: Ronald Lee <ronaldlee at vmware.com>
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> > This probably needs to be ported to master, but this was reported as
> > an urgent bug against branch-1.11, so I've fixed it there first.
> >
> > ofproto/ofproto-dpif.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> > index 0f4c42c..dc89727 100644
> > --- a/ofproto/ofproto-dpif.c
> > +++ b/ofproto/ofproto-dpif.c
> > @@ -3898,10 +3898,12 @@ handle_flow_miss(struct flow_miss *miss, struct
flow_miss_op *ops,
> > if (miss->key_fitness == ODP_FIT_TOO_LITTLE
> > || !flow_miss_should_make_facet(miss, &xout.wc)) {
> > handle_flow_miss_without_facet(rule, &xout, miss, ops,
n_ops);
> > + xlate_out_uninit(&xout);
> > return;
> > }
> >
> > facet = facet_create(miss, rule, &xout, stats);
> > + xlate_out_uninit(&xout);
> > stats = NULL;
> > }
> > handle_flow_miss_with_facet(miss, facet, now, stats, ops, n_ops);
> > --
> > 1.7.10.4
> >
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130820/a6a86f15/attachment-0003.html>
More information about the dev
mailing list