Skip to content

Commit 324a27a

Browse files
alfonsosicilianojohalun
authored andcommitted
DRM_SYSCTL_PRINT fails without the lock (FreeBSDDesktop#170)
fix 'mutex_unlock() system panic' when DRM_SYSCTL_PRINT fails and has not the lock, reproduced by: % sysctl -B 1 hw.dri.0.vblank % sysctl -B 1 hw.dri % sysctl -B 1 -a
1 parent 2599ce8 commit 324a27a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/drm_sysctl_freebsd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,8 @@ static int drm_vblank_info DRM_SYSCTL_HANDLER_ARGS
419419
int retcode;
420420
int i;
421421

422-
DRM_SYSCTL_PRINT("\ncrtc ref count last enabled inmodeset\n");
423422
mutex_lock(&dev->struct_mutex);
423+
DRM_SYSCTL_PRINT("\ncrtc ref count last enabled inmodeset\n");
424424
if (dev->vblank == NULL)
425425
goto done;
426426
for (i = 0 ; i < dev->num_crtcs ; i++) {

0 commit comments

Comments
 (0)