svn commit: r331298 - head/sys/dev/syscons

Warner Losh imp at FreeBSD.org
Wed Mar 21 14:47:17 UTC 2018


Author: imp
Date: Wed Mar 21 14:47:12 2018
New Revision: 331298
URL: https://svnweb.freebsd.org/changeset/base/331298

Log:
  Unlock giant when calling shutdown_nice()

Modified:
  head/sys/dev/syscons/syscons.c

Modified: head/sys/dev/syscons/syscons.c
==============================================================================
--- head/sys/dev/syscons/syscons.c	Wed Mar 21 14:47:08 2018	(r331297)
+++ head/sys/dev/syscons/syscons.c	Wed Mar 21 14:47:12 2018	(r331298)
@@ -3858,22 +3858,28 @@ next_code:
 
 	    case RBT:
 #ifndef SC_DISABLE_REBOOT
-		if (enable_reboot && !(flags & SCGETC_CN))
+		if (enable_reboot && !(flags & SCGETC_CN)) {
+			mtx_unlock(&Giant);
 			shutdown_nice(0);
+		}
 #endif
 		break;
 
 	    case HALT:
 #ifndef SC_DISABLE_REBOOT
-		if (enable_reboot && !(flags & SCGETC_CN))
+		if (enable_reboot && !(flags & SCGETC_CN)) {
+			mtx_unlock(&Giant);
 			shutdown_nice(RB_HALT);
+		}
 #endif
 		break;
 
 	    case PDWN:
 #ifndef SC_DISABLE_REBOOT
-		if (enable_reboot && !(flags & SCGETC_CN))
+		if (enable_reboot && !(flags & SCGETC_CN)) {
+			mtx_unlock(&Giant);
 			shutdown_nice(RB_HALT|RB_POWEROFF);
+		}
 #endif
 		break;
 


More information about the svn-src-head mailing list