On 7/17/2020 4:19 AM, Xia, Chenbo wrote: > >> -----Original Message----- >> From: Fu, Patrick <[email protected]> >> Sent: Wednesday, July 15, 2020 11:59 PM >> To: [email protected]; [email protected]; Xia, Chenbo >> <[email protected]> >> Cc: Wang, Yinan <[email protected]>; Fu, Patrick <[email protected]> >> Subject: [PATCH v1] vhost: set zmbufs to NULL when freed >> >> From: Patrick Fu <[email protected]> >> >> zmbufs should be set to NULL when getting freed to avoid double free on the >> same buffer pointer >> >> Fixes: b0a985d1f340 ("vhost: add dequeue zero copy") >> >> Signed-off-by: Patrick Fu <[email protected]> >> --- >> lib/librte_vhost/vhost_user.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c >> index >> df0db8a07..9ddeae362 100644 >> --- a/lib/librte_vhost/vhost_user.c >> +++ b/lib/librte_vhost/vhost_user.c >> @@ -1934,6 +1934,7 @@ free_zmbufs(struct vhost_virtqueue *vq) >> drain_zmbuf_list(vq); >> >> rte_free(vq->zmbufs); >> + vq->zmbufs = NULL; >> } >> >> /* >> -- >> 2.17.1 > > Reviewed-by: Chenbo Xia <[email protected]> >
Applied to dpdk-next-net/master, thanks.

