diff options
| author | Wentao Liang <vulab@iscas.ac.cn> | 2026-09-16 17:09:56 +0000 |
|---|---|---|
| committer | Juergen Gross <jgross@suse.com> | 2026-10-09 10:30:17 +0200 |
| commit | 6f165abe2b40ede71c98956cd74cd17c18505e75 (patch) | |
| tree | dc8287601679bb9431f3645bbe717e7f3f595aa4 /tools/perf/scripts/python | |
| parent | fcc43d1d6bf5fbd41e1e308b17187f9b759df56a (diff) | |
| download | linux-6f165abe2b40ede71c98956cd74cd17c18505e75.tar.gz linux-6f165abe2b40ede71c98956cd74cd17c18505e75.zip | |
xen/gntdev: Fix gntdev_dmabuf ref leak in dmabuf_exp_wait_released()
dmabuf_exp_wait_released() takes a reference on the exported
gntdev_dmabuf with dmabuf_exp_wait_obj_get_dmabuf() and passes it to
dmabuf_exp_wait_obj_new(), which drops that reference after adding the
wait object to the wait list. When the wait object allocation fails,
dmabuf_exp_wait_obj_new() returns ERR_PTR(-ENOMEM) early and the
reference is never dropped, leaking a reference to the exported
gntdev_dmabuf.
Drop the reference on the allocation failure path so the reference is
consumed whether the wait object is created or not.
Fixes: 932d6562179e ("xen/gntdev: Add initial support for dma-buf UAPI")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Message-ID: <20260916170956.2086505-1-vulab@iscas.ac.cn>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
