HomeFreeBSD

vm_phys_avail_count(): Fix out-of-bounds accesses

Description

vm_phys_avail_count(): Fix out-of-bounds accesses

On improper termination of phys_avail[] (two consecutive 0 starting at
an even index), this function would (unnecessarily) continue searching
for the termination markers even if the index was out of bounds.

Reviewed by: markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48629

Details

Provenance
olceAuthored on Oct 28 2024, 4:22 PM
Reviewer
markj
Differential Revision
D48629: vm_phys_avail_count(): Fix out-of-bounds accesses
Parents
rG8a14ddcc1d8e: vm_phys: Check for overlap when adding a segment
Branches
Unknown
Tags
Unknown