mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
pan/kmod: Fix a syncobj leak in the panthor backend
Make sure we release the syncobj attached to the BO if the object is sharable. Fixes:97f6a62f7e("pan/kmod: Add a backend for panthor") Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Acked-by: Constantine Shablia <constantine.shablya@collabora.com> Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28926> (cherry picked from commit068d111884)
This commit is contained in:
parent
ddf6f67b07
commit
1f917b8814
2 changed files with 7 additions and 1 deletions
|
|
@ -64,7 +64,7 @@
|
|||
"description": "pan/kmod: Fix a syncobj leak in the panthor backend",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "97f6a62f7ef82b909f62ca78788d4f24416fbd31",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -309,6 +309,12 @@ err_free_bo:
|
|||
static void
|
||||
panthor_kmod_bo_free(struct pan_kmod_bo *bo)
|
||||
{
|
||||
struct panthor_kmod_bo *panthor_bo =
|
||||
container_of(bo, struct panthor_kmod_bo, base);
|
||||
|
||||
if (!bo->exclusive_vm)
|
||||
drmSyncobjDestroy(bo->dev->fd, panthor_bo->sync.handle);
|
||||
|
||||
drmCloseBufferHandle(bo->dev->fd, bo->handle);
|
||||
pan_kmod_dev_free(bo->dev, bo);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue