From nobody Tue Nov 28 17:30:07 2023 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 4SfqGS2Blcz52GT8; Tue, 28 Nov 2023 17:30:08 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SfqGS1fkgz4DN8; Tue, 28 Nov 2023 17:30:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701192608; 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=7VsMYStDAiB7rASAwU+Fl8WnnXnVFdn9QOZWwyHjw0Y=; b=bUlYmvDIBkLx4ca+DYODjfSAaXl8+w14euNEdtZgh4F7zGtiOOdo5W/3qXPWyVydIk12ho EfMJItA+0PyyBWCHfz43rm6jmk9mGVhLb8YAYF7ekZFvS6hraQC1kHK//7DeAU3OQRpfGa Xalfj7Ic/pZQcb9rYxHps8SXQK+JES9QiTABh9ne094akqnfj7fiQfHnU2lRP4k9oxsUQa z/HBCQeYX4Ra/8YmPsI1U5hxUdnbyMWcoQsSytrMm7DKemWzLpsT0urgTtEL3wnoI47cwR 1VXLw7UjfNOPqRGsmg9HXgdFQo3MLZosyPGgu1vxHEix+eISxLoX4DicvygOYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701192608; 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=7VsMYStDAiB7rASAwU+Fl8WnnXnVFdn9QOZWwyHjw0Y=; b=vkFv4GNo6nyUfoQ6baDVXqV44UCTKwR4/iFlS91YOoY6mVubx6WYL/NBgnjYD5gmLfiwto /xavPZ4S9h4ane4de4dEk/t9unihJqYmP46TlHoR39YYQdtpI8g9Gwe7QvGHHhETSaZ/mC BQvIVcKeQVftMU2o7TDfhdJF5Q1gZ+07rqg3tixKix+UXzpHRFKlsFkiLdTTlFKYLgfFaG wrK5wnTho+0kUaUGL540BM54D6SdcRE/62rx53Ov1vd4SQsHCQFAhtAPnKne4e7GOjR+qI 8vqykeAtwyUljz1/zD1WCnLXdZrnnx7Ax6gbu2rvtqd47IoaOlldIeOPJPOhgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701192608; a=rsa-sha256; cv=none; b=l76AJEH3rcyD6Zamv/SRlIeCdZ4I4OSDOf0PENyCEc/jp9fXK2ioWCosLjqRbnx2Iwqgbh Ec1mAjFEP0lMd3Nkmb7y80tS1You5CnHykkwKPUzBgc1yDHXCme/0YWTkw/AGvkRhnHLmx idAYlKtouWmDvLu3Vqx/KHvCALfL5Hf6FsxDs/XcplbOUPVEINSojbzFqOz8KQ65z2IpZZ m4lROZ5v+MQHC1yl5LD/5wWagc33Le8No+ETTeOgudaWI3XKzuSPBtHXlaOOvLbZvQJZR/ v4GHJLcoP7yKeX0+XP6Y6/lOutXrDPKF1sMuZFCaLbg+n7uJzN/zrZbLXCPt9A== 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 4SfqGS0L1GzWpx; Tue, 28 Nov 2023 17:30:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3ASHU7Fx015791; Tue, 28 Nov 2023 17:30:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ASHU7eY015786; Tue, 28 Nov 2023 17:30:07 GMT (envelope-from git) Date: Tue, 28 Nov 2023 17:30:07 GMT Message-Id: <202311281730.3ASHU7eY015786@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: ed410b78edc5 - main - EVFILT_SIGNAL: do not use target process pointer on detach 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/main X-Git-Reftype: branch X-Git-Commit: ed410b78edc53e17b5a3e93ace2adbeb3a734ae9 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ed410b78edc53e17b5a3e93ace2adbeb3a734ae9 commit ed410b78edc53e17b5a3e93ace2adbeb3a734ae9 Author: Konstantin Belousov AuthorDate: 2023-11-28 12:51:54 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-28 17:29:58 +0000 EVFILT_SIGNAL: do not use target process pointer on detach It is enough to know knlist to remove from it, and the list is autodestroyed on last removal. PR: 275286 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42777 --- sys/kern/kern_sig.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 230564adf823..a2ca74ac9183 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -4296,9 +4296,7 @@ filt_sigattach(struct knote *kn) static void filt_sigdetach(struct knote *kn) { - struct proc *p = kn->kn_ptr.p_proc; - - knlist_remove(p->p_klist, kn, 0); + knlist_remove(kn->kn_knlist, kn, 0); } /*