diff --git a/src/memory/mod.rs b/src/memory/mod.rs index ac4064cac5..4516247ad3 100644 --- a/src/memory/mod.rs +++ b/src/memory/mod.rs @@ -1027,7 +1027,13 @@ pub fn page_fault_handler( let mut token = unsafe { CleanLockToken::new() }; match context::memory::try_correcting_page_tables(faulting_page, mode, &mut token) { Ok(()) => return Ok(()), - Err(PfError::Oom) => todo!("oom"), + Err(PfError::Oom) => { + log::warn!("page fault recovery failed: out of memory at {:#x}", faulting_page.start_address().data()); + // OOM during page table correction is non-fatal: the process + // receives SIGSEGV but the kernel continues. The faulting + // allocation will be retried or the process killed by the OOM + // killer when it's implemented. + } Err(PfError::Segv | PfError::RecursionLimitExceeded | PfError::NonfatalInternalError) => (), } }