Page MenuHomeFreeBSD

amd64/vmm.c: Fix an incorrect memory segment check in vm_iommu_{un}map
ClosedPublic

Authored by bnovkov on Dec 13 2025, 3:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jan 14, 7:39 AM
Unknown Object (File)
Wed, Jan 14, 4:04 AM
Unknown Object (File)
Mon, Jan 12, 10:44 AM
Unknown Object (File)
Wed, Jan 7, 8:49 PM
Unknown Object (File)
Wed, Jan 7, 3:38 AM
Unknown Object (File)
Tue, Jan 6, 6:19 AM
Unknown Object (File)
Mon, Dec 29, 12:14 AM
Unknown Object (File)
Dec 20 2025, 9:40 PM
Subscribers

Details

Summary

This change fixes two checks that conflated memory mapping and memory
segment idenitifers. In both cases the code iterates over all memory
mappings but passes the index to vm_memseg_sysmem, which is wrong.

Fix this by passing the memory mapping's segment identifier instead.

Fixes: c76c2a19ae37

Diff Detail

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