vhost: fix mbuf free
authorJunjie Chen <junjie.j.chen@intel.com>
Wed, 17 Jan 2018 15:45:53 +0000 (10:45 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Sun, 21 Jan 2018 14:51:52 +0000 (15:51 +0100)
commit3ebd930588b7847906e08e2645a35761a90abf2a
treed73546ca138540b00ed7195deefa76c8c84bfc56
parent7365504f77e36fe487c4ef54af2457fbf5018ca4
vhost: fix mbuf free

dequeue zero copy change buf_addr and buf_iova of mbuf, and return
to mbuf pool without restore them, it breaks vm memory if others allocate
mbuf from same pool since mbuf reset doesn't reset buf_addr and buf_iova.

Fixes: b0a985d1f340 ("vhost: add dequeue zero copy")
Cc: stable@dpdk.org
Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
lib/librte_vhost/virtio_net.c