diff options
| author | Deep Shah <deepshah146@gmail.com> | 2026-10-15 08:36:36 +0000 |
|---|---|---|
| committer | Leon Romanovsky <leon@kernel.org> | 2026-10-18 07:32:23 -0400 |
| commit | 4a953ee228f5544a3e5515eed88bf09d1a5adb94 (patch) | |
| tree | c2d11a364de4861490bcd67368528d2ca9227657 /tools/perf/scripts/python | |
| parent | 59df57262e6fa9e6f4aa76d6d324134777c702a0 (diff) | |
RDMA/uverbs: Fix uobject leak in DMABUF release
uverbs_dmabuf_release() treats a NULL uobj->context as an aborted
allocation, but normal ufile cleanup also clears it. Closing the uverbs
FD before the dma-buf FD therefore skips uverbs_uobject_release() and
leaks the uobject and ufile references.
Clear dmabuf->priv before dma_buf_put() on allocation failure and use
that NULL pointer to identify an abort. Otherwise, always call
uverbs_uobject_release(). This also avoids reading a freed uobject if
release is deferred until after the allocation has been aborted.
Fixes: 0ac6f4056c4a ("RDMA/uverbs: Add DMABUF object type and operations")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Deep Shah <deepshah146@gmail.com>
Link: https://patch.msgid.link/20261015083637.200958-2-deepshah146@gmail.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
