From nobody Fri Jun 17 19:40:28 2022 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 E937385CFC6; Fri, 17 Jun 2022 19:40:29 +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 4LPqC12bvVz3hSn; Fri, 17 Jun 2022 19:40:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494829; 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=eIi5cBd8RLs4Qs48GuY8V92T6AGpDQOnZMIkYyj8eRs=; b=Bh9qpCfdzux1l644TbrytBqh0WuViJlefCdgH4cI4wHUbZhwVjx+qSjWhv+IuC7ycCV/wB EZbYjjULrvt8rUJQi6xGy4qC2NevPqicHhL/Gi+/vUm10Ov7ZG+f2PeoULUizCukIfAyRn Sfrp77utvQrsMg7jWhFlarJYiDJgvWFxFOGETl1Z9vKXCByrP7zSFdyeVlJbeEsq/Ooiy8 C+NucVM3rhGmAUS71Cs+4hRujbiT7D2hncKtwSV0xqibXNX8VuL9CHaNYRrMhQQVkmBi/J 6B7M7Es9+uI1Kqf5Y25+W61/G/R+qm/Dzg8i+B00DykpgXyR0apOEaExjsBeKw== 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 0D7ED25C64; Fri, 17 Jun 2022 19:40:29 +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 25HJeSsG025861; Fri, 17 Jun 2022 19:40:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJeSc7025860; Fri, 17 Jun 2022 19:40:28 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:40:28 GMT Message-Id: <202206171940.25HJeSc7025860@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 2fe96ee7537b - stable/13 - sysvsem: Fix a typo 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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2fe96ee7537bd6072a365616f05a058dd23f7513 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494829; 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=eIi5cBd8RLs4Qs48GuY8V92T6AGpDQOnZMIkYyj8eRs=; b=hW+H0woED3zXUTKa0wAayYlj3H5OId9+8kmOPJmoWmSf5VmoJpsnaBVpaiorzwT9SPGiuQ wezzkTRrvxxKQ5QEkSmB0HzwaTmDQ1b5gxDB5CrWavcgd1gpWOMwrvFdbcE9oXtshoMgmv NyVPsuEhgJ3UY4iVkuMnGr3xoMrZNvI4oLWaDxoowq+1v0axJJaRh+G3ThRpnz3R7wOyJW neJTdERSnJWCJNod3d0nCfuc7J94z8zkpyUcDuDgpClQOHk5b2lgh2ECTNHBzvL3dkZoA2 +uMKczFDtbdAnZGAuFs027sy7mxacWmio8Tlz2HcKTEkBP+UJk4da4/1vX6o+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655494829; a=rsa-sha256; cv=none; b=JfJjUKYYt2XGrCjXZptojAyJDTK6UpCBv7Z+KVKXhJsD8zMj6Li/f4E6kOgwEJmuVA1bgv Hr4K6o9Qu+l+9LFFGDjfCi9fGKmpw9LLHgPgE/5LdQubmXHpguLszxvcvS1arAFBmR7XF+ 5MdpG2NoGHY6UdTrK9SlBO8Ac2t5ymxy0JQvNWtQxqBKpyS+QRST8qC3NsTharA+gDFj8o z3Te8XBEoyReRKFuSKj53huOlcdR0s5sa4CpzhjQ3tp73kNiUAWJifayAZ41rlqSpNqdPb nqqknZXLU8148PhqEpEn4oPzrH0wktAIUGBITFQ1gL25aLleSf2rtgS8yvYuRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=2fe96ee7537bd6072a365616f05a058dd23f7513 commit 2fe96ee7537bd6072a365616f05a058dd23f7513 Author: Dmitry Chagin AuthorDate: 2022-05-14 11:07:20 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-17 19:35:17 +0000 sysvsem: Fix a typo Per jamie@ rpr can be NULL if the jail is created with sysvsem=disable. But at least it doesn't appear to be fatal, since rpr is never dereferenced but is only compared to other prison pointers. Reviewed by: jamie Differential revision: https://reviews.freebsd.org/D35198 MFC after: 2 weeks (cherry picked from commit cb2ae6163174b90e999326ecec3699ee093a5d43) --- sys/kern/sysv_sem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index 469291d76d86..65fe2a233572 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -710,7 +710,7 @@ kern_semctl(struct thread *td, int semid, int semnum, int cmd, AUDIT_ARG_SVIPC_ID(semid); rpr = sem_find_prison(td->td_ucred); - if (sem == NULL) + if (rpr == NULL) return (ENOSYS); array = NULL; @@ -1130,7 +1130,7 @@ kern_semop(struct thread *td, int usemid, struct sembuf *usops, AUDIT_ARG_SVIPC_ID(usemid); rpr = sem_find_prison(td->td_ucred); - if (sem == NULL) + if (rpr == NULL) return (ENOSYS); semid = IPCID_TO_IX(usemid); /* Convert back to zero origin */