mbox series

[v2,0/8] ipc: fix possible memleaks

Message ID 20190423174334.19612-1-herakliusz.lipiec@intel.com (mailing list archive)
Series ipc: fix possible memleaks |


Herakliusz Lipiec April 23, 2019, 5:43 p.m. UTC
  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.

- 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(-)