Page MenuHomeFreeBSD

linuxkpi: gracefully handle page lookup failure in lkpi_vmf_insert_pfn_prot_locked
ClosedPublic

Authored by ashafer on Tue, Oct 28, 6:11 PM.
Tags
None
Referenced Files
F134130557: D53412.id165233.diff
Fri, Oct 31, 12:50 AM
F134130553: D53412.id.diff
Fri, Oct 31, 12:50 AM
F134130545: D53412.id165363.diff
Fri, Oct 31, 12:50 AM
F134106119: D53412.diff
Thu, Oct 30, 7:52 PM
Unknown Object (File)
Wed, Oct 29, 7:54 AM
Unknown Object (File)
Wed, Oct 29, 4:39 AM
Unknown Object (File)
Wed, Oct 29, 2:14 AM
Unknown Object (File)
Wed, Oct 29, 2:00 AM

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