Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 2008 20:19:56 +0000 (UTC)
From:      Robert Noland <rnoland@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r184212 - head/sys/dev/drm
Message-ID:  <200810232019.m9NKJub8065944@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rnoland
Date: Thu Oct 23 20:19:56 2008
New Revision: 184212
URL: http://svn.freebsd.org/changeset/base/184212

Log:
  This check is invalid and I disabled it once already.  I accidentally
  reintroduced it with the sync to git master.  Commit the fix in both
  places this time.
  
  Approved by:	jhb (mentor)
  MFC after:	2 weeks

Modified:
  head/sys/dev/drm/drm_lock.c

Modified: head/sys/dev/drm/drm_lock.c
==============================================================================
--- head/sys/dev/drm/drm_lock.c	Thu Oct 23 20:07:08 2008	(r184211)
+++ head/sys/dev/drm/drm_lock.c	Thu Oct 23 20:19:56 2008	(r184212)
@@ -105,17 +105,15 @@ int drm_unlock(struct drm_device *dev, v
 {
 	struct drm_lock *lock = data;
 
+	DRM_DEBUG("%d (pid %d) requests unlock (0x%08x), flags = 0x%08x\n",
+	    lock->context, DRM_CURRENTPID, dev->lock.hw_lock->lock,
+	    lock->flags);
+
 	if (lock->context == DRM_KERNEL_CONTEXT) {
 		DRM_ERROR("Process %d using kernel context %d\n",
 		    DRM_CURRENTPID, lock->context);
 		return EINVAL;
 	}
-	/* Check that the context unlock being requested actually matches
-	 * who currently holds the lock.
-	 */
-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock) ||
-	    _DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock) != lock->context)
-		return EINVAL;
 
 	DRM_SPINLOCK(&dev->tsk_lock);
 	if (dev->locked_task_call != NULL) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810232019.m9NKJub8065944>