HomeFreeBSD

sem_remove(): fix the loop that compacts sem array on semaphores removal.

Description

sem_remove(): fix the loop that compacts sem array on semaphores removal.

As written now, it copies random kernel memory from beyond the bounds
of the array.

Reported and tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation (kib)
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23694

Details

Provenance
kibAuthored on Feb 15 2020, 11:19 PM
Parents
rG4cb6ea7e8e3a: sem_remove(): add some asserts.
Branches
Unknown
Tags
Unknown

Event Timeline