ttm: on move memory failure don't leave a node dangling
Subsystems (3)
Dave Airlie
maintainerPATCH 1/1 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.
Signed-off-by Dave Airlie <[email protected]>
--- drivers/gpu/drm/ttm/ttm_bo.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/ttm/ttm_bo.c +1 -0
@@ -434,6 +434,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo, bo->mem = tmp_mem; bdev->driver->move_notify (bo, mem); bo->mem = *mem; + *mem = tmp_mem; } goto out_err;
Signature · 1 line
1.8.1
Quoted 6 lines · Dave Airlie
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_nodefrom the bo, which means we double free it. This is a follow on to the previous fix.Signed-off-by Dave Airlie <[email protected]>
Reviewed-by Jerome Glisse <[email protected]>
Quoted 23 lines
--- drivers/gpu/drm/ttm/ttm_bo.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/ttm/ttm_bo.c +1
-1@@ -434,6 +434,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo, bo->mem = tmp_mem; bdev->driver->move_notify (bo, mem); bo->mem = *mem; + *mem = tmp_mem; } goto out_err; --1.8.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel