summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authoryeeli <seven.yi.lee@gmail.com>2026-07-07 11:06:35 +0800
committerJason Gunthorpe <jgg@nvidia.com>2026-07-13 12:42:45 -0300
commitdba4254e216d7482d91d93e45faa3ccbefe79337 (patch)
tree830e064309cb3f37e133b9201270706276861626 /tools
parent4132ba2ae2cf14c289e3fabc1c95ac244d643356 (diff)
iommufd/selftest: Fix dmabuf leak in iommufd_test_dmabuf_get()
When dma_buf_export() succeeds but dma_buf_fd() fails (e.g. -EMFILE from fd exhaustion), the dmabuf is leaked with no dma_buf_put() called. Reproducer: exhaust fd table near RLIMIT_NOFILE, then repeatedly call IOMMU_TEST_OP_DMABUF_GET — htop shows unbounded memory growth. Fix by calling dma_buf_put(dmabuf) on error and returning directly. Fixes: d2041f1f11dd ("iommufd/selftest: Add some tests for the dmabuf flow") Link: https://patch.msgid.link/r/20260707030635.221577-1-seven.yi.lee@gmail.com Signed-off-by: yeeli <seven.yi.lee@gmail.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions