kern/114688: [drm] RADEON/AIGLX/DRM Problem

vehemens vehemens at verizon.net
Thu Sep 20 19:00:16 PDT 2007


The following reply was made to PR kern/114688; it has been noted by GNATS.

From: vehemens <vehemens at verizon.net>
To: bug-followup at freebsd.org, vehemens at verizon.net
Cc:  
Subject: Re: kern/114688: [drm] RADEON/AIGLX/DRM Problem
Date: Thu, 20 Sep 2007 18:56:09 -0700

 Revised 7-current patch with Jung-uk Kim's style fixes.
 
 --- drm_drv.c.orig	2006-09-07 16:04:47.000000000 -0700
 +++ drm_drv.c	2007-09-20 12:20:24.000000000 -0700
 @@ -711,6 +711,9 @@
  		return EINVAL;
  	}
  
 +	if (--priv->refs != 0)
 +		goto done;
 +
  	if (dev->driver.preclose != NULL)
  		dev->driver.preclose(dev, filp);
  
 @@ -786,17 +789,17 @@
  	dev->buf_pgid = 0;
  #endif /* __NetBSD__  || __OpenBSD__ */
  
 -	if (--priv->refs == 0) {
 -		if (dev->driver.postclose != NULL)
 -			dev->driver.postclose(dev, priv);
 -		TAILQ_REMOVE(&dev->files, priv, link);
 -		free(priv, M_DRM);
 -	}
 +
 +	if (dev->driver.postclose != NULL)
 +		dev->driver.postclose(dev, priv);
 +	TAILQ_REMOVE(&dev->files, priv, link);
 +	free(priv, M_DRM);
  
  	/* ========================================================
  	 * End inline drm_release
  	 */
  
 +done:
  	atomic_inc( &dev->counts[_DRM_STAT_CLOSES] );
  #ifdef __FreeBSD__
  	device_unbusy(dev->device);


More information about the freebsd-bugs mailing list