git: 474708c334a7 - main - fork1(): properly track the state of the pg_killsx lock

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Wed, 26 Jul 2023 23:34:03 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=474708c334a7d4fb27049e7dabaf5b74542568dd

commit 474708c334a7d4fb27049e7dabaf5b74542568dd
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-07-26 23:24:30 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-07-26 23:33:58 +0000

    fork1(): properly track the state of the pg_killsx lock
    
    Reported by:    dchagin
    Fixes:  232b922cb363e01ac0dd2a277d93cf74d8485e79
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/kern/kern_fork.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index e64a91ea5f80..83895e036e37 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -989,6 +989,7 @@ fork1(struct thread *td, struct fork_req *fr)
 		 * lock.
 		 */
 		sx_sunlock(&pg->pg_killsx);
+		killsx_locked = false;
 		error = ERESTART;
 		goto fail2;
 	} else {