From c7af46cf7d464ff89c64ab864fcd2af51d462812 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 8 Nov 2005 21:36:54 +0000 Subject: Correct another LOR issue with resource allocation. This leaves the drm_get_resource_* resource allocation a little racy, but they're getting called at either X Server startup or driver load, so it's serialized anyway. --- bsd-core/drm_drv.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bsd-core/drm_drv.c') diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c index 951f7462..d32534cb 100644 --- a/bsd-core/drm_drv.c +++ b/bsd-core/drm_drv.c @@ -508,7 +508,9 @@ static int drm_load(drm_device_t *dev) TAILQ_INIT(&dev->files); if (dev->driver.load != NULL) { + DRM_LOCK(); retcode = dev->driver.load(dev, dev->id_entry->driver_private); + DRM_UNLOCK(); if (retcode != 0) goto error; } -- cgit v1.2.3