On Fri, May 23, 2014 at 06:31:14PM -0700, Ethan Jackson wrote:
> The dpif flow dump API guarantees that keys it returns are not deleted
> unless dpif_flow_dump_next_may_destroy_keys() warns that they might
> be.  When dpif_linux_flow_dump_next() needed extra memory for a
> datapath flow's actions, it would use a special temporary buffer.
> Unfortunately, it also used memory from this temporary buffer for the
> keys it returned.  Thus, on the next loop this memory would be freed,
> breaking our invariant.
> 
> The correct solution to this problem is probably to fix this rather
> awkward API.  However, this patch's solution is small and simple, so
> it's fine for now.
> 
> Signed-off-by: Ethan Jackson <et...@nicira.com>

Acked-by: Ben Pfaff <b...@nicira.com>

I would consider pasting the valgrind error message in.

Also, a bit of information that I found helpful is: After this patch,
the special temporary buffer still gets freed on the next call, so the
actions will still not be available after the next call, but the API
only guarantees preserving the key, not the actions, so this is OK.

Thanks,

Ben.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to