From nobody Thu Jun 12 04:48:40 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bHqmS5HZCz5y6Jk; Thu, 12 Jun 2025 04:48:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bHqmS3QTzz3R0w; Thu, 12 Jun 2025 04:48:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749703720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=saX7tSfFzjKb8xIWllZkbewAAuS5Vs3XxkF5wY0cLVU=; b=YtKWQeL+e3pgUxffGffDZSuGfQz/OAiD5uCws1aJRjmWx9z3fuf+RB7/MYA/NajXK8fOJW 695HWY9Aa7MaFoiicOee71+H8OTmpA6SfpP/uXh7T8DuBu6som+Y9WUnJx6CYJXifv+DaM zNITZUG+ktilQAc1CQj+WIYvfhSGR40rDAb1dOBAXQiL/7GCID130Co24+B4EKRM4uvOVn S7ZgBJxnSR2zCYEDVPXCzYGaAwi6x0fID0YZoM7FpE2/ICvJqODIjBB6OqYRk+rsG9gl2C wliOYZROfJWC+KVhXqeEmu/S8oV2g8h/jYH7eVWgMbitj80zQw2/1Iq2ovI2VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749703720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=saX7tSfFzjKb8xIWllZkbewAAuS5Vs3XxkF5wY0cLVU=; b=bpXaQ6yR2lnNvhhmXkFfQXT51z3ChqgRhwfkgyYey+Hu7U74wxFHWVa0uTIdWjMr0w8Kwk ENtWh91d68J1BiKR+RtCYSxoKAENgbn5sQ8hox5Cp/x+6t+pQ5SqEDiLfbrbPItZjLCrjX oGgX+Bxyb6OiqUYwjuGsAgW0vzNwy5VJ2UmwdaSEcrda4itagktAlpcnmTD0nWixdcmPvH /qNO7HuVu1BJzleXz8mszkDIITi2RZ10UzjJRMg/I+LCCMeGyVwJltri2COtKyvY+lwQ5p ztlgNcqV8IJ68XscZw49KTL/hLoOwdD2O3DMBlritbtIIgtVewnNAsgdtTwqpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1749703720; a=rsa-sha256; cv=none; b=KD6Ek7jGW66K/4IabU0IgsZP8b+FeLL3a/hS8K+fQNc1lftf49C0fBYyU/ziWAfixYo5Wn vaixG+GfqkzEz3cjkc/i9/ibReOphqusJD4xc5nR0JeuLli5nEbqrygRAqFNF7Xq0elL1i +FGwIeh5DlO0olqpUhXEz48t1RAZG/xiAmdAfOJYzjt0lYR9ctw/N6xwEC6vQU+06rFYnT xDXLSbew9ZlaRRKI4p5TE0hIQMRntFjNsMC/I3aCfhfMTf/Exe60A1BjFHlfbr4a4fJ5hz 5JqVyN5A/jprfkHotSLkUdIFwWANnqLmPv4uxCtpug+tiphCSi8LFnKCh7oIwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bHqmS31l1zxjk; Thu, 12 Jun 2025 04:48:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 55C4meCp066770; Thu, 12 Jun 2025 04:48:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55C4meSj066767; Thu, 12 Jun 2025 04:48:40 GMT (envelope-from git) Date: Thu, 12 Jun 2025 04:48:40 GMT Message-Id: <202506120448.55C4meSj066767@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6cd0117bdb2c - stable/14 - exit1(): Ensure that SIGCHLD from reparented child is queued to reaper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6cd0117bdb2c4b90cb31f90712431fbe125d9755 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6cd0117bdb2c4b90cb31f90712431fbe125d9755 commit 6cd0117bdb2c4b90cb31f90712431fbe125d9755 Author: Konstantin Belousov AuthorDate: 2025-06-08 07:31:28 +0000 Commit: Konstantin Belousov CommitDate: 2025-06-12 04:28:27 +0000 exit1(): Ensure that SIGCHLD from reparented child is queued to reaper (cherry picked from commit 8dda34d0ef79d0d247b3487ae0499bdf12c9209e) --- sys/kern/kern_sig.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index cc0aecbc7756..0291c2647da6 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -3751,7 +3751,14 @@ sigparent(struct proc *p, int reason, int status) if (KSI_ONQ(p->p_ksi)) return; } - pksignal(p->p_pptr, SIGCHLD, p->p_ksi); + + /* + * Do not consume p_ksi if parent is zombie, since signal is + * dropped immediately. Instead, keep it since it might be + * useful for reaper. + */ + if (p->p_pptr->p_state != PRS_ZOMBIE) + pksignal(p->p_pptr, SIGCHLD, p->p_ksi); } static void