mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-23 18:07:03 +00:00
drm/gem: WARN about unbalanced handle refcounts
Trying to drop a reference we don't have is a pretty serious bug. Trying to paper over it is an even worse offense. So scream into dmesg with a big WARN in case that ever happens. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
6bc505b86a
commit
1216f73237
@ -238,7 +238,7 @@ static void drm_gem_object_handle_free(struct drm_gem_object *obj)
|
||||
void
|
||||
drm_gem_object_handle_unreference_unlocked(struct drm_gem_object *obj)
|
||||
{
|
||||
if (atomic_read(&obj->handle_count) == 0)
|
||||
if (WARN_ON(atomic_read(&obj->handle_count) == 0))
|
||||
return;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user