From nobody Sat May 14 11:07:56 2022 X-Original-To: dev-commits-src-main@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 10C581AE175E; Sat, 14 May 2022 11:07:57 +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 4L0jRJ50gxz3khx; Sat, 14 May 2022 11:07:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652526476; 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=frGSDp73MzrDso8FpShME8CoYdIdyomshp21iHvNPKw=; b=QrlMYMrihzJsmIDPkJJogCwd3O8MWXrTzlcpxhA31YKux8ifK05KeqvuolewURn2mtw/es Vs7AcbIJLdrzvsp1IWTWqWgEcPoZ8JW6bZmTHPIw2joZKi1ROOe/QYvdddcNwuByhCQeu7 ComLIC8rNtGAPtC/EqNJjBD1e4DD90suazPq+IjXnwhmiKMy8G5qxzZkBrkUT1w2TAXQCU xbTAic7Ig1SdZG6KqeZNN9sNUFNaaKisymmFOELHLQuxRxMLb8bWzEMes7HR0n53ntMHCd PKQqaX3PVbTJx72tKIhdK8O/H+dZOSa0xWDnEz7F2TIt3EfcywsCa85cw4hhLw== 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 2CB191640C; Sat, 14 May 2022 11:07:56 +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 24EB7uE1062188; Sat, 14 May 2022 11:07:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24EB7uu9062187; Sat, 14 May 2022 11:07:56 GMT (envelope-from git) Date: Sat, 14 May 2022 11:07:56 GMT Message-Id: <202205141107.24EB7uu9062187@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: cb2ae6163174 - main - sysvsem: Fix a typo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: cb2ae6163174b90e999326ecec3699ee093a5d43 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652526476; 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=frGSDp73MzrDso8FpShME8CoYdIdyomshp21iHvNPKw=; b=kveoIL4rNvOrbAB5UXpqxF0i5R9rGblO0ArzkZosOBOnuYhHbcEY54lPrMBsFHMJTyEE/V 4JIasI8tShvpaQ0T/IDxk3IuMrcsB75KeEwin8F0Wldjc05PeHkbPMVSqlLUDV1j3X+pyI dHZim7p12O0zgd3Vf1qjyMZ6Ir6Ri9ebakJd3d2ppRRBSyUxFAOPnLPn932dG40jt2YEfw ZIgQjYkPQhW03ty+wuBeex7HgFRFNG9C9tHBm/qezSLYRxA6zieFbFBcEFQbRqdccCVEAA XiLl7rEJgPQym9C8tKr68xK9wE4KHCMG25RuEIUWQvFPZbCkSwjP6TLxh6ckDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652526476; a=rsa-sha256; cv=none; b=Ypei6AA5V50WkrrONrHZemw690zicqNU0Em/4l1i4BgpLDiPVumvLw3R3JTI+3LNMfSBdI lVmD3cjEf/Y1zHMgsTCXaF/vUUkelNStyz26Y+9n3oXJMnE4URGLHXpY+MqC2xlLrobXJ1 GyP0Eq29pG9yExvynD33fWPoUhSJ/RFOdiuNEzmVDoMd90+MiikPU9kQRk6nyFI26dkNZK EEEZXCU3qRttImKrvrwaqE8zSfvHy2AwC6C26bNxa4WcTpap2zwoRcWVgU8m+ngOp0ClwC m85xXCBr1ouGN7YW8wEMwgiQQZG+qv5aBbHU2sPUVezKn9YdUvxDa6Umz+6j2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=cb2ae6163174b90e999326ecec3699ee093a5d43 commit cb2ae6163174b90e999326ecec3699ee093a5d43 Author: Dmitry Chagin AuthorDate: 2022-05-14 11:07:20 +0000 Commit: Dmitry Chagin CommitDate: 2022-05-14 11:07:20 +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 --- 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 4a76eedd4f7c..4104f1343cb7 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 */