[PATCH 01/10] drm/ttm: allocate resource object instead of embedding it v2

Christian König ckoenig.leichtzumerken at gmail.com
Mon Jun 7 17:54:41 UTC 2021



Am 07.06.21 um 19:06 schrieb Thomas Hellström (Intel):
>
> On 6/7/21 6:40 PM, Thomas Hellström (Intel) wrote:
>>
>> On 6/2/21 12:09 PM, Christian König wrote:
>> ...
>>> @@ -728,14 +728,15 @@ static int ttm_bo_add_move_fence(struct 
>>> ttm_buffer_object *bo,
>>>    */
>>>   static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo,
>>>                     const struct ttm_place *place,
>>> -                  struct ttm_resource *mem,
>>> +                  struct ttm_resource **mem,
>>>                     struct ttm_operation_ctx *ctx)
>>>   {
>>>       struct ttm_device *bdev = bo->bdev;
>>> -    struct ttm_resource_manager *man = ttm_manager_type(bdev, 
>>> mem->mem_type);
>>> +    struct ttm_resource_manager *man;
>>>       struct ww_acquire_ctx *ticket;
>>>       int ret;
>>>   +    man = ttm_manager_type(bdev, (*mem)->mem_type);
>>
>> Isn't (*mem) uninitialized here? Should be place->mem_type? Eviction 
>> is immediately sent to the bushes.
>>
>> Got at least one additional NULL pointer deref to track down in the 
>> eviction code, but could be a merge error of mine as well.
>
> Actually this last one was probably due to a bad temporary fix of the 
> above one.

I've found one more warning during my testing now. But that is just a 
false positive.

Apart from that I haven't seen any other fallout, but fingers crossed.

Christian.

>
> /Thomas
>
>>
>>



More information about the dri-devel mailing list