Re: [PATCH] drm/ttm: Fix ttm_bo_move_memcpy() for subclassed struct ttm_resource

2021-08-30 Thread Daniel Vetter
On Mon, Aug 30, 2021 at 09:48:35AM +0200, Thomas Hellström wrote: > 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

Re: [PATCH] drm/ttm: Fix ttm_bo_move_memcpy() for subclassed struct ttm_resource

2021-08-30 Thread Ben Skeggs
On Mon, 30 Aug 2021 at 17:48, Thomas Hellström wrote: > > 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 subcl

Re: [PATCH] drm/ttm: Fix ttm_bo_move_memcpy() for subclassed struct ttm_resource

2021-08-30 Thread Christian König
Am 30.08.21 um 09:48 schrieb Thomas Hellström: 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 wor

[PATCH] drm/ttm: Fix ttm_bo_move_memcpy() for subclassed struct ttm_resource

2021-08-30 Thread Thomas Hellström
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