From nobody Thu Oct 01 15:20:23 2026 X-Original-To: dev-commits-src-branches@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 4hwbFg4lK2z6v5G8 for ; Thu, 01 Oct 2026 15:20:23 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hwbFg2fj4z4Kgt for ; Thu, 01 Oct 2026 15:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790868023; 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=3gDnNDp4TYI5htZRS+0JC9hXnXtAlqI/GjB+uhVU2Uk=; b=x90VyldF+refwNeNi4wvQQUe4LQv8/d4c0FeKYRYNC8uNJPgM98DE7Zc7bYPc8mZw1nrvN LV0tE4EoepyBQPgOnfaWjcQpAIIg7M3ML+TLcPwZ4UpftTavksiQ6X+b5NjNnlAG/69q0F uN/MFSWAnJ0DN3rD+PXeJAFlU+p41H9OuAgwuuZJjp/Yq5Sk/sd8Y6sWwDSlOQfPMQHtPC 9H8arb233oNLpp57fQRLjRCQb8NuUT6IB6h1PYT/ch0Un7e2lqQaiY8eq2LWNi3zi9z4VR xIh6z0P05AfnU/KqXzhmZlHbqXBIBpupfC169UGc4mPqpy29qJdkMuFvAdqRHw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790868023; b=x1qYBh48+8VkHjEmFqwT+qFrs7vLtKKMwIVcHpEghBHoV6OYDOt7Vr2SGGMpRyP/hoz1Cu iKDmAdY68F0U/4t+lUMZHXx8DV4GfPJDlZH4npoAyYpTtMLQm0L/PKMDzqA4Xdt9y+wXMk IWiliMO5eZeBiqCGA60OPenAlghlxhjoQei2DGjcQgtkqE/9InmWPRfM6rAOSLhdzZfdPJ Tsj282wfdsHYSMD19ElnOOOeNJrwc7p3Z9l8FM5pNU8HmhJ7Zk1oc/0UMom3MFJJa555WZ 7von9elVgsQxM44W2mC3yex5RMCidWa8YIiuexCwYgHku9Kd4C14LixEQ3kuDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790868023; 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=3gDnNDp4TYI5htZRS+0JC9hXnXtAlqI/GjB+uhVU2Uk=; b=FqUcedHFdaV7eVIv6yP39X1U+XECAvrWxLogWLo4J+E2IyY/EpPr5XhtNNRcpJ9xkeNN+e 0zqtOydJYZt/4rc20vPEuTwxkps/YbBl+FBIQb3EXPsAmQD7xOVEL2lJI4nk3Df/+AwOuz 0aT/SUOyWUBFQNzn7Hc2BFwkJgTOSAyTyk/tVYiiuDpfYQh8z2clB02eJTq3y/P5SHuwoP VyazgyeF8BTkjoYtrjbHEJn6tLBuMvjQdQwz6s9UT5ysW4obX+QNCOOaMgHAQ5WZ0nZzrb QJnAhRQ7BqKkE25pEyr/qrC92iuJBBpWCbUvkVBWMZYPc3B8KbBGyHOiQgAsHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hwbFg1SXnzf7v for ; Thu, 01 Oct 2026 15:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a0e0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 01 Oct 2026 15:20:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: adfcef9dfe2e - stable/15 - posixshm: Fix a double unlock in shm_partial_page_invalidate() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: adfcef9dfe2e68395512fba31741e989c2e4f6f3 Auto-Submitted: auto-generated Date: Thu, 01 Oct 2026 15:20:23 +0000 Message-Id: <6abe7a37.3a0e0.1cfea2a2@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=adfcef9dfe2e68395512fba31741e989c2e4f6f3 commit adfcef9dfe2e68395512fba31741e989c2e4f6f3 Author: Mark Johnston AuthorDate: 2026-09-23 16:53:53 +0000 Commit: Mark Johnston CommitDate: 2026-10-01 13:42:28 +0000 posixshm: Fix a double unlock in shm_partial_page_invalidate() For some reason, shm_partial_page_invalidate() unlocks the object upon an error, but its callers don't expect this. Don't do any special error handling. Keep the subroutine anyway since the name is a bit clearer than vm_page_grab_zero_partial(). While here, normalize the object pointer used for locking in shm_deallocate(). Reviewed by: kib Fixes: 454bc887f250 ("uipc_shm: Implements fspacectl(2) support") MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D59877 (cherry picked from commit ba974faaf30b74472acc4f0dc5853a22d43951f2) --- sys/kern/uipc_shm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index b77731f8188b..7df9d59716c7 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -723,12 +723,7 @@ static int shm_partial_page_invalidate(vm_object_t object, vm_pindex_t idx, int base, int end) { - int error; - - error = vm_page_grab_zero_partial(object, idx, base, end); - if (error == EIO) - VM_OBJECT_WUNLOCK(object); - return (error); + return (vm_page_grab_zero_partial(object, idx, base, end)); } static int @@ -2093,7 +2088,7 @@ shm_deallocate(struct shmfd *shmfd, off_t *offset, off_t *length, int flags) } out: - VM_OBJECT_WUNLOCK(shmfd->shm_object); + VM_OBJECT_WUNLOCK(object); *offset = off; *length = len; return (error);