linux/drivers/infiniband/hw/efa
Leon Romanovsky e22a3627b7 RDMA/efa: Keep EQ resources alive while IRQ is registered
The completion IRQ handler accesses the EQ state and DMA buffer. Its IRQ was
registered before that state was initialized, while teardown released the
buffer before free_irq() synchronized the handler.

Initialize the EQ without arming it, register the IRQ, and then arm it.
Reverse the resource order during teardown by freeing the IRQ before
destroying the EQ.

Fixes: 2a152512a1 ("RDMA/efa: CQ notifications")
Link: https://patch.msgid.link/20260907-use-after-free-of-admin-queue-struct-v1-2-dd9d9267fbf4@nvidia.com
Reviewed-by: Michael Margolin <mrgolin@amazon.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-09-10 09:35:13 -04:00
..
efa_admin_cmds_defs.h RDMA/efa: Decouple admin command payload from admin header 2026-08-12 20:53:57 -03:00
efa_admin_defs.h RDMA/efa: Add support for 128B admin v2 SQ entry 2026-08-12 20:53:57 -03:00
efa_ah_cache.c RDMA/efa: Add AH cache handling on create and destroy AH 2026-07-12 04:43:17 -04:00
efa_ah_cache.h RDMA/efa: Add AH cache handling on create and destroy AH 2026-07-12 04:43:17 -04:00
efa_com_cmd.c RDMA/efa: Decouple admin command payload from admin header 2026-08-12 20:53:57 -03:00
efa_com_cmd.h RDMA/efa: Add CQ/QP creation with 64-bit SQ req ID support 2026-07-23 04:01:42 -04:00
efa_com.c RDMA/efa: Keep EQ resources alive while IRQ is registered 2026-09-10 09:35:13 -04:00
efa_com.h RDMA/efa: Keep EQ resources alive while IRQ is registered 2026-09-10 09:35:13 -04:00
efa_common_defs.h RDMA/efa: Unified getters/setters for device structs bitmask access 2020-02-28 12:12:04 -04:00
efa_io_defs.h RDMA/efa: Add CQ/QP creation with 64-bit SQ req ID support 2026-07-23 04:01:42 -04:00
efa_main.c RDMA/efa: Keep EQ resources alive while IRQ is registered 2026-09-10 09:35:13 -04:00
efa_regs_defs.h RDMA/efa: CQ notifications 2021-10-06 19:47:18 -03:00
efa_verbs.c RDMA/efa: Fix PBL chunk length computation 2026-07-28 08:03:10 -04:00
efa.h RDMA/efa: Add Completion Counters support 2026-07-22 05:45:47 -04:00
Kconfig RDMA/efa: Add checksum support for admin responses 2026-05-18 04:58:41 -04:00
Makefile RDMA/efa: Add initialization of AH cache rhashtable 2026-07-12 04:43:17 -04:00