diff options
author | jhb <jhb@FreeBSD.org> | 2003-04-17 22:29:23 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-04-17 22:29:23 +0000 |
commit | a5725b28f3df458f3524cd1cf52febbd1c8fb2f3 (patch) | |
tree | 6aa0e9770eac7492b7e5e82933ae965befe2203d /sys/kern/kern_shutdown.c | |
parent | 2cdea9a30c27c6defb0ba1499ce06ef78eceade1 (diff) | |
download | FreeBSD-src-a5725b28f3df458f3524cd1cf52febbd1c8fb2f3.zip FreeBSD-src-a5725b28f3df458f3524cd1cf52febbd1c8fb2f3.tar.gz |
Lock the sched_lock while setting TDF_INPANIC.
Diffstat (limited to 'sys/kern/kern_shutdown.c')
-rw-r--r-- | sys/kern/kern_shutdown.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index e85a310..abcf113 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -535,7 +535,9 @@ panic(const char *fmt, ...) } #endif #endif + mtx_lock_spin(&sched_lock); td->td_flags |= TDF_INPANIC; + mtx_unlock_spin(&sched_lock); if (!sync_on_panic) bootopt |= RB_NOSYNC; boot(bootopt); |