mbox series

[v3,0/3] Fix IDXD PCI device close

Message ID 20220704152751.943965-1-kevin.laatz@intel.com (mailing list archive)
Headers
Series Fix IDXD PCI device close |

Message

Kevin Laatz July 4, 2022, 3:27 p.m. UTC
  This patchset addresses the device close for IDXD PCI devices.
Initially, there was a memory leak reported by ASAN for the 'pci' member
of the 'idxd_dmadev' struct due to a missing free. In addition, this
patch set corrects the behaviour of the device close function to ensure
the cleanup is completed correctly.

Depends-on: patch-112376 ("eal: add device removal in rte cleanup")

---
v3:
* move ref_count increment from common create to pci probe
* improve commit messages

v2:
* remove changes to applications (no longer needed with EAL changes)
* add fix for NULL pointer dereference in pci remove

Kevin Laatz (3):
  dma/idxd: fix memory leak in pci close
  dma/idxd: fix memory leak due to free on incorrect pointer
  dma/idxd: fix null pointer dereference during pci remove

 drivers/dma/idxd/idxd_internal.h |  2 ++
 drivers/dma/idxd/idxd_pci.c      | 45 +++++++++++++++++++++++---------
 2 files changed, 35 insertions(+), 12 deletions(-)
  

Comments

Thomas Monjalon July 5, 2022, 7:09 p.m. UTC | #1
04/07/2022 17:27, Kevin Laatz:
> This patchset addresses the device close for IDXD PCI devices.
> Initially, there was a memory leak reported by ASAN for the 'pci' member
> of the 'idxd_dmadev' struct due to a missing free. In addition, this
> patch set corrects the behaviour of the device close function to ensure
> the cleanup is completed correctly.
> 
> Depends-on: patch-112376 ("eal: add device removal in rte cleanup")

I assume it is not a real dependency.
We can fix closing without calling the close function in EAL cleanup.

Applied, thanks.