[dpdk-stable] [PATCH] test/mbuf: fix access to freed memory

David Marchand david.marchand at redhat.com
Wed Nov 3 16:00:26 CET 2021


On Fri, Oct 29, 2021 at 2:16 PM Olivier Matz <olivier.matz at 6wind.com> wrote:
>
> Seen by ASan.
>
> In the external buffer mbuf test, we check that the buffer is freed
> by checking that its refcount is 0. This is not a valid condition,
> because it accesses to an already freed area.
>
> Fix this by setting a boolean flag in the callback when rte_free()
> is actually called, and check this flag instead.
>
> Bugzilla ID: 867
> Fixes: 7b295dceea07 ("test/mbuf: add unit test cases")
> Cc: stable at dpdk.org
>
> Reported-by: David Marchand <david.marchand at redhat.com>
> Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>


-- 
David Marchand



More information about the stable mailing list