From nobody Thu Oct 07 16:40:25 2021 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 6FBBB12BDCDB; Thu, 7 Oct 2021 16:40:25 +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 4HQHB12jwqz3sZF; Thu, 7 Oct 2021 16:40:25 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 395F017233; Thu, 7 Oct 2021 16:40:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 197GeP7o022614; Thu, 7 Oct 2021 16:40:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 197GePK7022613; Thu, 7 Oct 2021 16:40:25 GMT (envelope-from git) Date: Thu, 7 Oct 2021 16:40:25 GMT Message-Id: <202110071640.197GePK7022613@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jamie Gritton Subject: git: 1ee0746e1af0 - stable/12 - MFC uipc_shm: Fix kern.ipc.posix_shm_list for jails 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: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1ee0746e1af042f5c02f4121652f4ea0ec3788d3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=1ee0746e1af042f5c02f4121652f4ea0ec3788d3 commit 1ee0746e1af042f5c02f4121652f4ea0ec3788d3 Author: Jamie Gritton AuthorDate: 2021-09-29 17:20:36 +0000 Commit: Jamie Gritton CommitDate: 2021-10-07 16:40:16 +0000 MFC uipc_shm: Fix kern.ipc.posix_shm_list for jails Fix error return of kern.ipc.posix_shm_list, which caused it (and thus "posixshmcontrol ls") to fail for all jails that didn't happen to own the last shm object in the list. (cherry picked from commit 747a47261eee59b6e9c437cd2c1b3979df5c32ac) --- sys/kern/uipc_shm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 07925baa3390..ee13692d2f1c 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -1174,8 +1174,10 @@ sysctl_posix_shm_list(SYSCTL_HANDLER_ARGS) LIST_FOREACH(shmm, &shm_dictionary[i], sm_link) { error = shm_fill_kinfo_locked(shmm->sm_shmfd, &kif, true); - if (error == EPERM) + if (error == EPERM) { + error = 0; continue; + } if (error != 0) break; pack_kinfo(&kif);