Re: [PATCH] drm/prime: warn for non-empty handle lookup list during drm file release

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 24, 2013 at 07:04:57PM +0300, Imre Deak wrote:
> 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: Imre Deak <imre.deak@xxxxxxxxx>
Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> ---
> 
>  drivers/gpu/drm/drm_prime.c |    7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
> index 71c7315..dcde352 100644
> --- a/drivers/gpu/drm/drm_prime.c
> +++ b/drivers/gpu/drm/drm_prime.c
> @@ -488,11 +488,8 @@ EXPORT_SYMBOL(drm_prime_init_file_private);
>  
>  void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv)
>  {
> -	struct drm_prime_member *member, *safe;
> -	list_for_each_entry_safe(member, safe, &prime_fpriv->head, entry) {
> -		list_del(&member->entry);
> -		kfree(member);
> -	}
> +	/* by now drm_gem_release should've made sure the list is empty */
> +	WARN_ON(!list_empty(&prime_fpriv->head));
>  }
>  EXPORT_SYMBOL(drm_prime_destroy_file_private);
>  
> -- 
> 1.7.10.4
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux