aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Noland <rnoland@FreeBSD.org>2008-08-30 00:53:30 +0000
committerRobert Noland <rnoland@FreeBSD.org>2008-08-30 00:53:30 +0000
commitac165058b7de2768bb1bde4f9d42aa0c1bfadde4 (patch)
treeb770fb8e52056d26366c9148dd9fcda6513a97a8
parent4d8fefdaf4bc79f7c023c657ce1df466d265e753 (diff)
downloadsrc-ac165058b7de2768bb1bde4f9d42aa0c1bfadde4.tar.gz
src-ac165058b7de2768bb1bde4f9d42aa0c1bfadde4.zip
We need to lock around driver unload now.
The i915 driver installs it's register map at load time now. We can't remove the map during unload without holding the lock. Approved by: kib
Notes
Notes: svn path=/head/; revision=182468
-rw-r--r--sys/dev/drm/drm_drv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/drm/drm_drv.c b/sys/dev/drm/drm_drv.c
index dd818bbdc798..7ed2393e6f03 100644
--- a/sys/dev/drm/drm_drv.c
+++ b/sys/dev/drm/drm_drv.c
@@ -660,8 +660,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);