summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Noland <rnoland@2hip.net>2008-08-29 12:29:50 -0400
committerRobert Noland <rnoland@2hip.net>2008-08-29 15:46:05 -0400
commitc7f7b6d7e2f46753381de51e4b0b00211a1a6b5f (patch)
tree92c8d846d492bb2e02f523475fb8eaa3052f41fe
parentf8a14b1f9556919617208a8eb88ff88d6c77f08d (diff)
[FreeBSD] Fix a couple of locking problems.
-rw-r--r--bsd-core/drm_drv.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c
index 32b284e1..47c212e2 100644
--- a/bsd-core/drm_drv.c
+++ b/bsd-core/drm_drv.c
@@ -460,7 +460,9 @@ static int drm_lastclose(struct drm_device *dev)
dev->magiclist[i].head = dev->magiclist[i].tail = NULL;
}
+ DRM_UNLOCK();
drm_drawable_free_all(dev);
+ DRM_LOCK();
/* Clear AGP information */
if ( dev->agp ) {
@@ -655,8 +657,11 @@ static void drm_unload(struct drm_device *dev)
dev->agp = NULL;
}
- if (dev->driver.unload != NULL)
+ if (dev->driver.unload != NULL) {
+ DRM_LOCK();
dev->driver.unload(dev);
+ DRM_UNLOCK();
+ }
delete_unrhdr(dev->drw_unrhdr);