git: 28b36ecf990f - main - Revert "exit1(): Revert sparc64 workaround"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 09 Aug 2023 06:07:55 UTC
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=28b36ecf990fc28a935ab2ce75f7504721c3a7ea commit 28b36ecf990fc28a935ab2ce75f7504721c3a7ea Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2023-08-09 05:56:58 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2023-08-09 06:00:20 +0000 Revert "exit1(): Revert sparc64 workaround" This reverts commit 96c76d930656f13d3c041dc8d8f2fc3dd1e5e05a. There are other relatively common reasons why init might get killed during reboot, the workaround was really not sparc64-specific. Discussed with: marius Sponsored by: The FreeBSD Foundation --- sys/kern/kern_exit.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index e3345c14df26..f1ab2f68b3f2 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -238,7 +238,14 @@ exit1(struct thread *td, int rval, int signo) TSPROCEXIT(td->td_proc->p_pid); p = td->td_proc; - if (p == initproc) { + /* + * In case we're rebooting we just let init die in order to + * work around an issues where pid 1 might get a fatal signal. + * For instance, if network interface serving NFS root is + * going down due to reboot, page-in requests for text are + * failing. + */ + if (p == initproc && rebooting == 0) { printf("init died (signal %d, exit %d)\n", signo, rval); panic("Going nowhere without my init!"); }