[FreeBSD] Fix a couple of locking problems.

This commit is contained in:
Robert Noland 2008-08-29 12:29:50 -04:00
parent f8a14b1f95
commit c7f7b6d7e2

View file

@ -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);