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
This commit is contained in:
parent
b6c8f461f0
commit
cb2ae61631
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user