[dpdk-dev] [PATCH v2 0/8] ipc: fix possible memleaks

Herakliusz Lipiec herakliusz.lipiec at intel.com
Tue Apr 23 19:43:26 CEST 2019


When sending multiple requests, rte_mp_request_sync
can succeed sending a few of those requests, but then
fail on a later one and in the end return with rc=-1.
The upper layers - e.g. device hotplug - currently
handles this case as if no messages were sent and no
memory for response buffers was allocated, which is
not true. Fixed by always initializing message buffer
to NULL and calling free everytime rte_mp_request_sync
is used.

v2:
- resending as patchset to make it easier to review it.
- changed commit message as requested.
- added bugzilla id.
Bugzilla ID: 228

Herakliusz Lipiec (8):
  ipc: fix rte_mp_request_sync memleak
  ipc: fix hotplug memleak
  ipc: fix vdev memleak
  ipc: fix vfio memleak
  ipc: fix pdump memleak
  ipc: fix tap pmd memleak
  ipc: fix net/mlx4 memleak
  ipc: fix net/mlx5 memleak

 drivers/bus/vdev/vdev.c                 | 3 +--
 drivers/net/mlx4/mlx4_mp.c              | 4 +++-
 drivers/net/mlx5/mlx5_mp.c              | 4 +++-
 drivers/net/tap/rte_eth_tap.c           | 2 ++
 lib/librte_eal/common/eal_common_proc.c | 6 +++---
 lib/librte_eal/common/hotplug_mp.c      | 2 ++
 lib/librte_eal/common/include/rte_eal.h | 3 ++-
 lib/librte_eal/linux/eal/eal_vfio.c     | 8 ++++----
 lib/librte_pdump/rte_pdump.c            | 2 +-
 9 files changed, 21 insertions(+), 13 deletions(-)

-- 
2.17.2



More information about the dev mailing list