[ovs-git] [openvswitch/ovs] dd52de: netdev-dpdk: vhost: Fix double free and use after ...

GitHub noreply at github.com
Thu Aug 11 01:44:12 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: dd52de45b719da1e52cc6894e245198fda5a748e
      https://github.com/openvswitch/ovs/commit/dd52de45b719da1e52cc6894e245198fda5a748e
  Author: Ilya Maximets <i.maximets at samsung.com>
  Date:   2016-08-10 (Wed, 10 Aug 2016)

  Changed paths:
    M lib/netdev-dpdk.c

  Log Message:
  -----------
  netdev-dpdk: vhost: Fix double free and use after free with QoS.

While using QoS with vHost interfaces 'netdev_dpdk_qos_run__()' will
free mbufs while executing 'netdev_dpdk_policer_run()'. After
that same mbufs will be freed at the end of '__netdev_dpdk_vhost_send()'
if 'may_steal == true'. This behaviour will break mempool.

Also 'netdev_dpdk_qos_run__()' will free packets even if we shouldn't
do this ('may_steal == false'). This will lead to using of already freed
packets by the upper layers.

Fix that by copying all packets that we can't steal like it done
for DPDK_DEV_ETH devices and freeing only packets not freed by QoS.

Fixes: 0bf765f753fd ("netdev_dpdk.c: Add QoS functionality.")
Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Tested-by: Ian Stokes <ian.stokes at intel.com>
Acked-by: Daniele Di Proietto <diproiettod at vmware.com>




More information about the git mailing list