Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Mar 2018 14:47:13 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r331298 - head/sys/dev/syscons
Message-ID:  <201803211447.w2LElDcK091988@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803211447.w2LElDcK091988>