From owner-freebsd-bugs@FreeBSD.ORG Sat Sep 22 15:38:07 2007 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 468E216A41B; Sat, 22 Sep 2007 15:38:07 +0000 (UTC) (envelope-from nork@FreeBSD.org) Received: from sakura.ninth-nine.com (unknown [IPv6:2001:2f0:104:80a0:230:48ff:fe41:2455]) by mx1.freebsd.org (Postfix) with ESMTP id D616413C44B; Sat, 22 Sep 2007 15:38:06 +0000 (UTC) (envelope-from nork@FreeBSD.org) Received: from nadesico.ninth-nine.com (nadesico.ninth-nine.com [219.127.74.122]) by sakura.ninth-nine.com (8.14.1/8.14.1/NinthNine) with SMTP id l8MFc5r3082192; Sun, 23 Sep 2007 00:38:05 +0900 (JST) (envelope-from nork@FreeBSD.org) Date: Sun, 23 Sep 2007 00:38:04 +0900 From: Norikatsu Shigemura To: vehemens , jkim@FreeBSD.org Message-Id: <20070923003804.fd9a08ff.nork@FreeBSD.org> In-Reply-To: <200709210200.l8L20F9l067670@freefall.freebsd.org> References: <200709210200.l8L20F9l067670@freefall.freebsd.org> X-Mailer: Sylpheed 2.4.5 (GTK+ 2.10.14; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (sakura.ninth-nine.com [219.127.74.121]); Sun, 23 Sep 2007 00:38:05 +0900 (JST) Cc: freebsd-bugs@FreeBSD.org Subject: Re: kern/114688: [drm] RADEON/AIGLX/DRM Problem X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2007 15:38:07 -0000 Hi vehemens! On Fri, 21 Sep 2007 02:00:15 GMT vehemens wrote: > Revised 7-current patch with Jung-uk Kim's style fixes. I didn't know this PR. I was embarrassed about this issue, too. I confirmed that following patch is GOOD works. >> jkim Would you please commit your patch? > --- 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);