Commit 98b76231 authored by Imre Deak's avatar Imre Deak Committed by Dave Airlie

drm/prime: warn for non-empty handle lookup list during drm file release

drm_gem_release should release all handles connected to the drm file and
so should also release the prime lookup entries of these handles. So
just WARN if this isn't the case.
Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 33896bf3
...@@ -488,11 +488,8 @@ EXPORT_SYMBOL(drm_prime_init_file_private); ...@@ -488,11 +488,8 @@ EXPORT_SYMBOL(drm_prime_init_file_private);
void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv) void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv)
{ {
struct drm_prime_member *member, *safe; /* by now drm_gem_release should've made sure the list is empty */
list_for_each_entry_safe(member, safe, &prime_fpriv->head, entry) { WARN_ON(!list_empty(&prime_fpriv->head));
list_del(&member->entry);
kfree(member);
}
} }
EXPORT_SYMBOL(drm_prime_destroy_file_private); EXPORT_SYMBOL(drm_prime_destroy_file_private);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment