Date: Sat, 14 May 2022 11:07:56 GMT From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: cb2ae6163174 - main - sysvsem: Fix a typo Message-ID: <202205141107.24EB7uu9062187@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=cb2ae6163174b90e999326ecec3699ee093a5d43 commit cb2ae6163174b90e999326ecec3699ee093a5d43 Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2022-05-14 11:07:20 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> 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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202205141107.24EB7uu9062187>