Page MenuHomeFreeBSD

vm_fault: avoid vm_page_next()
ClosedPublic

Authored by dougm on Jul 27 2024, 5:41 PM.
Tags
None
Referenced Files
F97839106: D46168.id.diff
Tue, Oct 1, 11:40 AM
Unknown Object (File)
Tue, Oct 1, 5:33 AM
Unknown Object (File)
Fri, Sep 27, 12:44 AM
Unknown Object (File)
Wed, Sep 25, 9:10 AM
Unknown Object (File)
Tue, Sep 24, 8:16 PM
Unknown Object (File)
Tue, Sep 24, 8:05 PM
Unknown Object (File)
Sun, Sep 22, 12:01 AM
Unknown Object (File)
Fri, Sep 20, 4:34 PM
Subscribers

Details

Summary

vm_fault calls vm_page_next in two places where it ought to use TAILQ_NEXT and add assertions. The result is that in a NODEBUG kernel, the vm_page_next code does needless pindex calculations, and in a GENERIC kernel it leads either to a failed KASSERT or a null-pointer reference that could be caught more clearly by the KASSERTs I've added.

Diff Detail

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

Event Timeline

dougm requested review of this revision.Jul 27 2024, 5:41 PM
dougm created this revision.
This revision is now accepted and ready to land.Jul 27 2024, 8:59 PM
This revision was automatically updated to reflect the committed changes.