mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-16 06:52:27 +00:00
Unlock giant when calling shutdown_nice()
This commit is contained in:
parent
b799e21b28
commit
026fb270ca
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331298
|
@ -3858,22 +3858,28 @@ scgetc(sc_softc_t *sc, u_int flags, struct sc_cnstate *sp)
|
||||||
|
|
||||||
case RBT:
|
case RBT:
|
||||||
#ifndef SC_DISABLE_REBOOT
|
#ifndef SC_DISABLE_REBOOT
|
||||||
if (enable_reboot && !(flags & SCGETC_CN))
|
if (enable_reboot && !(flags & SCGETC_CN)) {
|
||||||
|
mtx_unlock(&Giant);
|
||||||
shutdown_nice(0);
|
shutdown_nice(0);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HALT:
|
case HALT:
|
||||||
#ifndef SC_DISABLE_REBOOT
|
#ifndef SC_DISABLE_REBOOT
|
||||||
if (enable_reboot && !(flags & SCGETC_CN))
|
if (enable_reboot && !(flags & SCGETC_CN)) {
|
||||||
|
mtx_unlock(&Giant);
|
||||||
shutdown_nice(RB_HALT);
|
shutdown_nice(RB_HALT);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PDWN:
|
case PDWN:
|
||||||
#ifndef SC_DISABLE_REBOOT
|
#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);
|
shutdown_nice(RB_HALT|RB_POWEROFF);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue