summaryrefslogtreecommitdiff
path: root/drivers/dma-buf
diff options
context:
space:
mode:
authorThomas Hellström <thomas.hellstrom@linux.intel.com>2021-08-31 09:15:36 +0200
committerThomas Hellström <thomas.hellstrom@linux.intel.com>2021-08-31 10:48:26 +0200
commitefcefc7127290e7e9fa98dea029163ad8eda8fb3 (patch)
tree63e8c72478054eee3540d323ecc3a3c352e9d841 /drivers/dma-buf
parentbd7ffbc3ca12629aeb66fb9e28cf42b7f37e3e3b (diff)
drm/ttm: Fix ttm_bo_move_memcpy() for subclassed struct ttm_resource
The code was making a copy of a struct ttm_resource. However, recently the struct ttm_resources were allowed to be subclassed and also were allowed to be malloced, hence the driver could end up assuming the copy we handed it was subclassed and worse, the original could have been freed at this point. Fix this by using the original struct ttm_resource before it is potentially freed in ttm_bo_move_sync_cleanup() v2: Base on drm-misc-next-fixes rather than drm-tip. Reported-by: Ben Skeggs <skeggsb@gmail.com> Reported-by: Dave Airlie <airlied@gmail.com> Cc: Christian König <christian.koenig@amd.com> Cc: <stable@vger.kernel.org> Fixes: 3bf3710e3718 ("drm/ttm: Add a generic TTM memcpy move for page-based iomem") Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210831071536.80636-1-thomas.hellstrom@linux.intel.com
Diffstat (limited to 'drivers/dma-buf')
0 files changed, 0 insertions, 0 deletions