diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-15 02:02:36 +0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-08-19 04:47:37 +0400 |
commit | 1216f732379151cd581444e385a8266d0b54549d (patch) | |
tree | 4bb20e8000b08255a46f9be345f00099eb6d333d /drivers/gpu/drm | |
parent | 6bc505b86ae9d4ab45464e3e3c0ab8992d6a5aff (diff) | |
download | linux-1216f732379151cd581444e385a8266d0b54549d.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/drm_gem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 44978bcf8125..dcbd2f559e39 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -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; /* |