Page MenuHomeFreeBSD

linuxkpi: gracefully handle page lookup failure in lkpi_vmf_insert_pfn_prot_locked
ClosedPublic

Authored by ashafer on Oct 28 2025, 6:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 24, 9:52 AM
Unknown Object (File)
Sun, Nov 23, 11:32 AM
Unknown Object (File)
Nov 2 2025, 9:10 PM
Unknown Object (File)
Nov 2 2025, 7:29 PM
Unknown Object (File)
Oct 31 2025, 12:50 AM
Unknown Object (File)
Oct 31 2025, 12:50 AM
Unknown Object (File)
Oct 31 2025, 12:50 AM
Unknown Object (File)
Oct 30 2025, 7:52 PM

Details

Summary

Currently lkpi_vmf_insert_pfn_prot_locked will check the page iter to
find a usage of the page. If no page was found, it continues on to
try using PHYS_TO_VM_PAGE() to get a page. Currently it does not check
if a valid page was found before passing it to vm_page_busy_acquire,
which can cause a kernel page fault as vm_page_busy_acquire expects
a valid page pointer.

This can easily be triggered while starting KDE6 in wayland mode, which
many users have been reporting. With this change plasma6 starts properly
in wayland mode.

Sponsored by: NVIDIA

Diff Detail

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