mirror of
https://github.com/torvalds/linux.git
synced 2026-10-17 06:20:02 +02:00
ena_device_init() initializes the MMIO read mechanism with
ena_com_mmio_reg_read_request_init(), which allocates a coherent DMA
buffer for MMIO read responses.
The normal removal path releases this buffer through
ena_com_mmio_reg_read_request_destroy(). However, if ena_probe() fails
after ena_device_init() succeeds, the error path destroys the admin
resources and eventually frees ena_dev without destroying the MMIO read
request, leaving the coherent DMA buffer allocated.
Call ena_com_mmio_reg_read_request_destroy() in the probe error path
before releasing the remaining device resources.
This issue was found by manual code inspection.
Fixes:
|
||
|---|---|---|
| .. | ||
| ena_admin_defs.h | ||
| ena_com.c | ||
| ena_com.h | ||
| ena_common_defs.h | ||
| ena_debugfs.c | ||
| ena_debugfs.h | ||
| ena_devlink.c | ||
| ena_devlink.h | ||
| ena_eth_com.c | ||
| ena_eth_com.h | ||
| ena_eth_io_defs.h | ||
| ena_ethtool.c | ||
| ena_netdev.c | ||
| ena_netdev.h | ||
| ena_pci_id_tbl.h | ||
| ena_phc.c | ||
| ena_phc.h | ||
| ena_regs_defs.h | ||
| ena_xdp.c | ||
| ena_xdp.h | ||
| Makefile | ||