Page MenuHomeFreeBSD

vm_phys_enq_range: no alignment assert for npages==0
ClosedPublic

Authored by dougm on Aug 4 2023, 2:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 28 2024, 11:18 PM
Unknown Object (File)
Nov 28 2024, 7:20 AM
Unknown Object (File)
Nov 28 2024, 7:20 AM
Unknown Object (File)
Nov 28 2024, 7:20 AM
Unknown Object (File)
Nov 28 2024, 7:20 AM
Unknown Object (File)
Nov 28 2024, 6:59 AM
Unknown Object (File)
Nov 19 2024, 11:17 PM
Unknown Object (File)
Nov 17 2024, 4:14 AM
Subscribers

Details

Summary

Do not assume that when vm_phys_enq_range is passed npages==0 that the vm_page argument is valid in any way, much less that it has a page-aligned address. Just don't look at it. Assert nothing about it.

Diff Detail

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

Event Timeline

dougm requested review of this revision.Aug 4 2023, 2:07 AM
dougm created this revision.

This looks right to me, and works on my system. Perhaps a comment in the block before the routine would be appropriate, saying that npages may be zero, in which case nothing should be done.

Add to the preface comment that npages may be zero.

This revision was not accepted when it landed; it landed in state Needs Review.Aug 4 2023, 6:44 PM
This revision was automatically updated to reflect the committed changes.