diff options
| author | Dave Airlie <airlied@gmail.com> | 2013-01-16 00:58:34 -0500 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2013-01-20 22:45:23 -0500 |
| commit | 014b34409fb2015f63663b6cafdf557fdf289628 (patch) | |
| tree | fd30b4512a1f2a992c03bcf808ead98f4d1b21fa /drivers/gpu | |
| parent | 630541863b29f88c7ab34e647758344e4cd1eafd (diff) | |
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>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 33d20be87db5..52b20b12c83a 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
| @@ -434,6 +434,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo, | |||
| 434 | bo->mem = tmp_mem; | 434 | bo->mem = tmp_mem; |
| 435 | bdev->driver->move_notify(bo, mem); | 435 | bdev->driver->move_notify(bo, mem); |
| 436 | bo->mem = *mem; | 436 | bo->mem = *mem; |
| 437 | *mem = tmp_mem; | ||
| 437 | } | 438 | } |
| 438 | 439 | ||
| 439 | goto out_err; | 440 | goto out_err; |
