Page MenuHomeFreeBSD

vm_radix_init: use initializer
ClosedPublic

Authored by dougm on Jul 11 2023, 10:08 AM.
Tags
None
Referenced Files
F103014675: D40971.diff
Tue, Nov 19, 8:32 PM
Unknown Object (File)
Wed, Nov 13, 3:33 PM
Unknown Object (File)
Tue, Oct 29, 5:41 PM
Unknown Object (File)
Sep 27 2024, 11:12 AM
Unknown Object (File)
Sep 26 2024, 12:41 AM
Unknown Object (File)
Sep 23 2024, 5:58 PM
Unknown Object (File)
Sep 22 2024, 6:57 PM
Unknown Object (File)
Sep 17 2024, 9:26 PM
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

Lint
Lint Skipped
Unit
Tests Skipped

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
921–927

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.