HomeFreeBSD

vm_page: Fix handling of empty bad memory addresses file

Description

vm_page: Fix handling of empty bad memory addresses file

If a file with bad memory addresses is configured but that file is
empty (0 lines, 0 bytes), when loading it we end up returning an end
pointer that is just _before_ the start of the (empty) file content.

Adjust the code to make it clear what pre-condition are required to set
the *list / *end pointers correctly, and explicitly set them to NULL
when they are not matched.

Reported by: marklmi@yahoo.com
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D51717

(cherry picked from commit f90940ce6eb71df40538c35a65d77ad3093c679a)

Details

Provenance
romainAuthored on Aug 3 2025, 5:42 AM
Reviewer
kib
Differential Revision
D51717: Fix handling of empty bad memory addresses file
Parents
rGd88f8a306cfe: pmap_demote_{l2,pde}: never invalidate wired mappings
Branches
Unknown
Tags
Unknown