From ce640bea7378bb141b355e23e441e312dc984362 Mon Sep 17 00:00:00 2001 From: vasilito Date: Fri, 10 Jul 2026 23:00:45 +0300 Subject: [PATCH] kernel: fix usermode_bootstrap stack mmap error handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The .map_err().?() pattern doesn't work in a function returning (), because ? requires the enclosing function to return Result. Replace with plain .expect() (these are bootstrap initialization failures — if mmap fails here, the kernel cannot continue). --- src/syscall/process.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/syscall/process.rs b/src/syscall/process.rs index 2b310a0d3a..76b5bbbb1f 100644 --- a/src/syscall/process.rs +++ b/src/syscall/process.rs @@ -334,8 +334,7 @@ pub unsafe fn usermode_bootstrap(bootstrap: &Bootstrap, token: &mut CleanLockTok flusher, )?) }, - ) - .map_err(|e| format!("failed to mmap bootstrap stack: {e:?}"))?; + ); }; debug!( "Bootstrap stack mapped at {:#x}..{:#x} ({} pages)",