V2 patch sent with revised title

> -----Original Message-----
> From: Maxime Coquelin <maxime.coque...@redhat.com>
> Sent: Monday, July 20, 2020 11:52 PM
> To: Fu, Patrick <patrick...@intel.com>; dev@dpdk.org; Xia, Chenbo
> <chenbo....@intel.com>
> Cc: Wang, Yinan <yinan.w...@intel.com>
> Subject: Re: [PATCH v1] vhost: set zmbufs to NULL when freed
> 
> Do you agree with below title?
> vhost: fix double-free with zero-copy
> 
> Thanks,
> Maxime
> 
> On 7/15/20 5:58 PM, patrick...@intel.com wrote:
> > From: Patrick Fu <patrick...@intel.com>
> >
> > 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 <patrick...@intel.com>
> > ---
> >  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;
> >  }
> >
> >  /*
> >

Reply via email to