Commit fb9ee87
fix(page-fault): remove redundant CR2 read that panics on error
The page fault handler was reading CR2 twice:
1. Line 894: Cr2::read().unwrap_or(...) - handles errors gracefully
2. Line 923: Cr2::read().expect(...) - panics on error
The second read is redundant and uses .expect() which causes panics
when CR2::read() returns Err. This was causing CI failures at
[80/138] SIGTERM kill test with KERNEL PANIC at interrupts.rs:923:37.
Fix: Reuse the cr2 value already read safely on line 894 by converting
it back to a VirtAddr instead of reading CR2 again.
Co-Authored-By: Ryan Breen <ryanbreen@gmail.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 5a9bc74 commit fb9ee87
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
920 | 920 | | |
921 | 921 | | |
922 | 922 | | |
923 | | - | |
| 923 | + | |
| 924 | + | |
924 | 925 | | |
925 | 926 | | |
926 | 927 | | |
| |||
0 commit comments