From nobody Wed Sep 23 16:55:36 2026 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 4hqjlF0dDkz6tL2h for ; Wed, 23 Sep 2026 16:55:37 +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 4hqjlD3VGlz4V76 for ; Wed, 23 Sep 2026 16:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790182536; 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=tHZR2kAsaWL3p2uI4C/2JFOJX/GPa+W6BkSw1AYC0n0=; b=If0WJXOkprd+fgT83cu/q4L5rpS0y7NNg/rjXkL7mgSru3oxq4BKAUh0SNK80OKXDIBC7S cGWCUnwAWq31qjCWILREKB+0Hjalw8djmTW+t/Zp3lpIfg8aixkfPZi/VJpQRLILcKaN1Q uAgl6uuwPhwDMy7jE04pcjEDikmJ3+ebE0idXyZQxb+YZ7FLczznkM74FG/nm+VHYex1W4 nQ8jbjZBlGgpqIuzeoOWAS9A+oCmKF9w9ICobY/PmaQ695S7yG5PyBM//zoPjOXTZcT9jU +uix7Dxy/e7V7AZYZ2SZUQ0Nzxy11wPscn0ObTNWWfkR9shnDfHF+q9kKQGbYw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790182536; b=RrFxgrQEVWadLIVGp3ufN9CwCAABGpmnzRJrtLHCfn0VIxwPS701Zv7z9gjvNcGt+pZf/8 E+6rw3GwfuFSyQAY+dnDF6Ht77s7S+WN2ISzXyplAF7js59AncE92AcD+iGh6RsL27sEwc /ZyTa055ykhUjtOW/E5wlD6gs0Z4JUQ+tXRXU1As9RVM0HKQdZwTnURWYs2iJkhrisp4HC 2YHTsxeR9Ipi/PaiBQAPUMaKLnQEa4J+KrW6JIKuL113RDG9RaoCbj6+7Hxe89FSwYszOq /3fvxdnwCMYzdP2ZdsGsLqT0mPIENntTPo6ixUlcbRzfrfDuTRAajvOFaBDhpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790182536; 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=tHZR2kAsaWL3p2uI4C/2JFOJX/GPa+W6BkSw1AYC0n0=; b=RxBqM7WiNiYta90tM66ed4cpZF9fD2EsuUlTmW+hQ1oTfCJ5c+Ba5pi5PPUUVY+y/AMBlU yI5hkcHLKOHM/gBTlieilP1A8arUR5r3C2/lfhX5OJtV7kkHNRgEEUs/9O8q73elTrbDoj PhlKLVnCB5f9pkv3sdEgMXucBerq99ly9jdlcZebIsmv5B26ZF+hWbed6VRRvOpZy0c0uP 7Iym1F9UX4lyHSBivHW1mNzedN0gpEkYgMpQHCq3DcBPfUot6cutwOwbskQuBLmT7n42nf lvPiYOk7QxrjPQr60sLqKiVvQW5WPMaDNxj98KrRvxdPn3ktgEj3O0YKYmzeFQ== 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 4hqjlD1nYQz12CQ for ; Wed, 23 Sep 2026 16:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d7f3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 23 Sep 2026 16:55:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: ba974faaf30b - main - posixshm: Fix a double unlock in shm_partial_page_invalidate() 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 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/main X-Git-Reftype: branch X-Git-Commit: ba974faaf30b74472acc4f0dc5853a22d43951f2 Auto-Submitted: auto-generated Date: Wed, 23 Sep 2026 16:55:36 +0000 Message-Id: <6ab40488.3d7f3.4cf8d721@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ba974faaf30b74472acc4f0dc5853a22d43951f2 commit ba974faaf30b74472acc4f0dc5853a22d43951f2 Author: Mark Johnston AuthorDate: 2026-09-23 16:53:53 +0000 Commit: Mark Johnston CommitDate: 2026-09-23 16:53:53 +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 --- 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);