artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08003bb
)
drm/ttm: Don't leak a resource on swapout move error
author
jsg
<jsg@openbsd.org>
Wed, 26 Jul 2023 06:40:47 +0000
(06:40 +0000)
committer
jsg
<jsg@openbsd.org>
Wed, 26 Jul 2023 06:40:47 +0000
(06:40 +0000)
From Thomas Hellstrom
f037f6038736bd038ddb9c72de979a08cc1ee3b5
in linux-6.1.y/6.1.40
a590f03d8de7c4cb7ce4916dc7f2fd10711faabe
in mainline linux
sys/dev/pci/drm/ttm/ttm_bo.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/ttm/ttm_bo.c
b/sys/dev/pci/drm/ttm/ttm_bo.c
index
994c67f
..
ca0d0bf
100644
(file)
--- a/
sys/dev/pci/drm/ttm/ttm_bo.c
+++ b/
sys/dev/pci/drm/ttm/ttm_bo.c
@@
-1191,6
+1191,7
@@
int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
ret = ttm_bo_handle_move_mem(bo, evict_mem, true, &ctx, &hop);
if (unlikely(ret != 0)) {
WARN(ret == -EMULTIHOP, "Unexpected multihop in swaput - likely driver bug.\n");
+ ttm_resource_free(bo, &evict_mem);
goto out;
}
}