Skip to content

Commit 014b344

Browse files
committed
ttm: on move memory failure don't leave a node dangling
if we have a move notify callback, when moving fails, we call move notify the opposite way around, however this ends up with *mem containing the mm_node from the bo, which means we double free it. This is a follow on to the previous fix. Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
1 parent 6305418 commit 014b344

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/ttm/ttm_bo.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
434434
bo->mem = tmp_mem;
435435
bdev->driver->move_notify(bo, mem);
436436
bo->mem = *mem;
437+
*mem = tmp_mem;
437438
}
438439

439440
goto out_err;

0 commit comments

Comments
 (0)