net/virtio: fix buffer leak on VLAN insert
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 5 Apr 2019 16:31:15 +0000 (09:31 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 19 Apr 2019 12:51:54 +0000 (14:51 +0200)
commit8f37e38241f291f2ae8fa7e8d0d4ec3eae50b2de
treee8e7c326f348fe78455ef3f244e8d5d1bf660b1d
parentfd4fa52cbf733164176269b5cce809403d2ef227
net/virtio: fix buffer leak on VLAN insert

The function rte_vlan_insert may allocate a new buffer for the
vlan header and return a different mbuf than originally passed.
In this case, the stored mbuf in txm[] array could point to wrong
buffer.

Fixes: dd856dfcb9e7 ("virtio: use any layout on Tx")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/net/virtio/virtio_rxtx.c