Skip to contentSkip to conversation

drm/ttm: switch to per device LRU lock

bug report Dan Carpenter 1 participant 1 message Mar 26, 2021

lore
Share & tools
lore
#0 lore raw

Hello Christian König,

This is a semi-automatic email about new static checker warnings.

The patch a1f091f8ef2b: "drm/ttm: switch to per device LRU lock" from Oct 6, 2020, leads to the following Smatch complaint:

drivers/gpu/drm/ttm/ttm_bo.c:665 ttm_mem_evict_first()
error: we previously assumed 'bo' could be null (see line 662)

drivers/gpu/drm/ttm/ttm_bo.c
661

   662		if (!bo) {
                     ^^

"bo" is NULL

663 if (busy_bo && !ttm_bo_get_unless_zero(busy_bo))
664 busy_bo = NULL;

   665			spin_unlock(&bo->bdev->lru_lock);
                                     ^^^^^^^^^^^^^^^^^^

Dereference

   666			ret = ttm_mem_evict_wait_busy(busy_bo, ctx, ticket);
   667			if (busy_bo)

regards,
dan carpenter
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel