linux/drivers/net/ethernet/amazon/ena
Dawei Feng 1bd6676254 net: ena: clean up XDP TX queues when regular TX setup fails
create_queues_with_size_backoff() creates XDP TX queues before setting
up the regular TX path. If the subsequent allocation or creation of
regular TX queues fails, the error handling paths omit the teardown of the
XDP TX queues, leading to a resource leak.

Fix this by explicitly destroying the XDP TX queue subset at the two
missing failure points.

The bug was first flagged by an experimental analysis tool we are
developing for kernel memory-management bugs while analyzing
v6.13-rc1. The tool is still under development and is not yet publicly
available. Manual inspection confirms that the bug is still
present in v7.1-rc7.

An x86_64 allyesconfig build showed no new warnings. As we do not have
an ENA device to test with, no runtime testing was able to be performed.

Fixes: 548c4940b9 ("net: ena: Implement XDP_TX action")
Cc: stable@vger.kernel.org
Signed-off-by: Dawei Feng <dawei.feng@seu.edu.cn>
Reviewed-by: Arthur Kiyanovski <akiyano@amazon.com>
Tested-by: Arthur Kiyanovski <akiyano@amazon.com>
Link: https://patch.msgid.link/20260616142424.4005130-1-dawei.feng@seu.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-18 18:11:22 -07:00
..
ena_admin_defs.h net: Fix typos 2025-07-25 10:29:07 -07:00
ena_com.c net: ena: PHC: Add missing barrier 2026-06-05 18:28:21 -07:00
ena_com.h net: ena: Add PHC support in the ENA driver 2025-06-18 18:57:28 -07:00
ena_common_defs.h net: ena: Change license into format to SPDX in all files 2020-09-21 13:54:22 -07:00
ena_debugfs.c net: ena: View PHC stats using debugfs 2025-06-18 18:57:29 -07:00
ena_debugfs.h net: ena: Add debugfs support to the ENA driver 2025-06-18 18:57:29 -07:00
ena_devlink.c devlink: pass param values by pointer 2026-05-25 14:03:06 -07:00
ena_devlink.h net: ena: Control PHC enable through devlink 2025-06-18 18:57:29 -07:00
ena_eth_com.c net: ena: Add validation for completion descriptors consistency 2024-05-13 14:42:04 -07:00
ena_eth_com.h net: ena: Reduce holes in ena_com structures 2024-05-13 14:42:04 -07:00
ena_eth_io_defs.h net: ena: Change license into format to SPDX in all files 2020-09-21 13:54:22 -07:00
ena_ethtool.c net: ena: convert to use .get_rx_ring_count 2026-01-17 18:10:16 -08:00
ena_netdev.c net: ena: clean up XDP TX queues when regular TX setup fails 2026-06-18 18:11:22 -07:00
ena_netdev.h net: ena: Add debugfs support to the ENA driver 2025-06-18 18:57:29 -07:00
ena_pci_id_tbl.h net: ena: Change license into format to SPDX in all files 2020-09-21 13:54:22 -07:00
ena_phc.c net: ena: PHC: Check return code before setting timestamp output 2026-05-11 17:22:48 -07:00
ena_phc.h net: ena: Add PHC support in the ENA driver 2025-06-18 18:57:28 -07:00
ena_regs_defs.h net: ena: Add PHC support in the ENA driver 2025-06-18 18:57:28 -07:00
ena_xdp.c net: ena: Set tx_info->xdpf value to NULL 2024-04-11 11:21:02 +02:00
ena_xdp.h net: ena: Always register RX queue info 2024-01-03 18:00:58 -08:00
Makefile net: ena: Add debugfs support to the ENA driver 2025-06-18 18:57:29 -07:00