]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
RDMA/efa: Fix use of completion ctx after free
authorYonatan Nachum <ynachum@amazon.com>
Sun, 8 Mar 2026 16:53:50 +0000 (16:53 +0000)
committerLeon Romanovsky <leon@kernel.org>
Sun, 8 Mar 2026 18:46:42 +0000 (14:46 -0400)
commitef3b06742c8a201d0e83edc9a33a89a4fe3009f8
tree191f1f510dc19141f27d407bf018c64c225278a0
parentc242e92c9da456d361d1d4482fb6e93ee95bd8cf
RDMA/efa: Fix use of completion ctx after free

On admin queue completion handling, if the admin command completed with
error we print data from the completion context. The issue is that we
already freed the completion context in polling/interrupts handler which
means we print data from context in an unknown state (it might be
already used again).
Change the admin submission flow so alloc/dealloc of the context will be
symmetric and dealloc will be called after any potential use of the
context.

Fixes: 68fb9f3e312a ("RDMA/efa: Remove redundant NULL pointer check of CQE")
Reviewed-by: Daniel Kranzdorf <dkkranzd@amazon.com>
Reviewed-by: Michael Margolin <mrgolin@amazon.com>
Signed-off-by: Yonatan Nachum <ynachum@amazon.com>
Link: https://patch.msgid.link/20260308165350.18219-1-ynachum@amazon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/efa/efa_com.c