numam-dpdk/drivers/dma
Kevin Laatz 1a57c8d553 dma/idxd: fix partial freeing in PCI close
During PCI device close, any allocated memory needs to be free'd.
Currently, one of the free's is being called on an incorrect idxd_dmadev
struct member, namely 'batch_idx_ring'.

At device creation, memory is allocated for both 'batch_comp_ring' and
'batch_idx_ring' simultaneously. Calling free only on 'batch_idx_ring'
meant the first half of this memory was not being free'd, leading to the
memleak.

This patch fixes this memleak by calling free on 'batch_comp_ring' which
will free the memory for both rings.

Fixes: 9449330a84 ("dma/idxd: create dmadev instances on PCI probe")
Cc: stable@dpdk.org

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-07-05 21:34:38 +02:00
..
cnxk dma/cnxk: fix installing internal headers 2022-01-27 18:11:11 +01:00
dpaa dma/dpaa: support statistics 2021-11-10 13:48:38 +01:00
dpaa2 remove unnecessary null checks 2022-06-24 14:51:09 +02:00
hisilicon dma/hisilicon: fix includes in header file 2022-06-15 16:33:42 +02:00
idxd dma/idxd: fix partial freeing in PCI close 2022-07-05 21:34:38 +02:00
ioat dma/ioat: add burst capacity 2021-10-22 22:40:59 +02:00
skeleton dma/skeleton: support multiple instances 2022-06-15 16:17:52 +02:00
meson.build dma/dpaa2: introduce driver skeleton 2022-06-01 08:58:27 +02:00