Page MenuHomeFreeBSD

vm_radix_init: use initializer
ClosedPublic

Authored by dougm on Jul 11 2023, 10:08 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 17, 2:40 AM
Unknown Object (File)
Tue, May 7, 5:12 PM
Unknown Object (File)
Tue, May 7, 5:12 PM
Unknown Object (File)
Fri, May 3, 3:29 AM
Unknown Object (File)
Thu, May 2, 10:45 PM
Unknown Object (File)
Mar 19 2024, 3:28 PM
Unknown Object (File)
Mar 19 2024, 3:22 PM
Unknown Object (File)
Mar 19 2024, 4:48 AM
Subscribers

Details

Summary

Several vm_radix tries are not initialized with vm_radix_init. That works, for now, since static initialization zeroes the root field anyway, but if initialization changes, these tries will fail. Add missing initializer calls.

Test Plan

A kernel that checked for proper initialization was built and run on amd64 and all the vm_radix tries that were used were verified as properly initialized.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jul 14 2023, 12:48 AM
sys/vm/vm_object.c
297

If this were an ordinary object, then this would happen before the call to _vm_object_allocate().

Move lines after written and verbal direction from alc.

This revision now requires review to proceed.Jul 14 2023, 5:00 AM
sys/arm64/arm64/pmap.c
1290–1299

Ugh, in reviewing this, I observed that neither arm64 nor riscv ever TAILQ_INIT() the pm_pvchunk field. I believe that the only reason that they don't crash is that their first operations on the field are TAILQ_FIRST() and TAILQ_INSERT_HEAD().

This revision is now accepted and ready to land.Jul 14 2023, 5:11 AM
This revision was automatically updated to reflect the committed changes.