Date: Fri, 8 Dec 2023 22:03:10 GMT From: Mitchell Horne <mhorne@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 08b952c56b5e - stable/14 - shutdown: tweak kproc/kthread shutdown check Message-ID: <202312082203.3B8M3ALq021064@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=08b952c56b5e69d752a8a4bf42ff16f666c3eb5d commit 08b952c56b5e69d752a8a4bf42ff16f666c3eb5d Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2023-11-23 15:27:57 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2023-12-08 22:02:45 +0000 shutdown: tweak kproc/kthread shutdown check This is to handle the case where the system has not panicked but the debugger is active, where we still can't wait for thread termination. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42683 (cherry picked from commit 960612a19f009df602a4cb008fa90a45a6e869bb) --- sys/kern/kern_shutdown.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 19920d30357f..b69caebe17d9 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -1011,7 +1011,7 @@ kproc_shutdown(void *arg, int howto) struct proc *p; int error; - if (KERNEL_PANICKED()) + if (SCHEDULER_STOPPED()) return; p = (struct proc *)arg; @@ -1031,7 +1031,7 @@ kthread_shutdown(void *arg, int howto) struct thread *td; int error; - if (KERNEL_PANICKED()) + if (SCHEDULER_STOPPED()) return; td = (struct thread *)arg;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202312082203.3B8M3ALq021064>