[ovs-dev] [PATCH 2/2] ofpbuf: Fix setting of 'msg' in ofpbuf_clone_with_headroom()

Jarno Rajahalme jarno at ovn.org
Mon Mar 7 19:07:16 UTC 2016


Thanks for the review!

I split out the more substantial change you pointed out to a separate patch and pushed the series to master.

  Jarno

> On Mar 4, 2016, at 6:55 PM, Joe Stringer <joe at ovn.org> wrote:
> 
> (Responding to both patches here as I'm having email reception problems)
> 
> On 3 March 2016 at 15:12, Jarno Rajahalme <jarno at ovn.org> wrote:
>> Commit 38876d31 fixed setting 'msg' when resizing an ofpbuf, but
>> failed to fix the same issue in ofpbuf_clone_with_headroom().  Without
>> this fix the newly cloned ofpbuf's 'msg', if non-NULL, will point to
>> the buffer of the original ofpbuf.
>> 
>> Signed-off-by: Jarno Rajahalme <jarno at ovn.org>
> 
> In the first patch, there are two changes: Adjusting the header offset
> calculation, and some nice cosmetic improvements. It's not entirely
> straightforward to see, but I think that if the ptrdiff_t is unsigned
> and the new buffer is actually allocated earlier in memory than the
> old buffer, then the offset is really wrong. This change should stand
> alone from cosmetic fixes. That said, I completely agree with those
> changes.
> 
> This second patch LGTM.
> 
> Acked-by: Joe Stringer <joe at ovn.org>




More information about the dev mailing list