DragonFlyBSD Kernel Audit
DF-1679 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/drm/drm_file.c
+++ b/sys/dev/drm/drm_file.c
@@ -326,9 +326,11 @@
 	if (IS_ERR(minor))
 		return PTR_ERR(minor);
 
+	mutex_lock(&drm_global_mutex);
 	dev = minor->dev;
 	if (!dev->open_count++)
 		need_setup = 1;
+	mutex_unlock(&drm_global_mutex);
 
 	/* share address_space across all char-devs of a single device */
 #if 0