File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,10 +152,6 @@ impl PageTableEntry {
152152 physical_address. is_aligned_to( BasePageSize :: SIZE ) ,
153153 "Physical address is not on a 4 KiB page boundary (physical_address = {physical_address:#X})"
154154 ) ;
155- assert ! (
156- !physical_address. is_null( ) ,
157- "Cannot set a page table entry with null address"
158- ) ;
159155
160156 let mut flags_to_set = flags;
161157 flags_to_set. insert ( PageTableEntryFlags :: VALID ) ;
@@ -386,7 +382,7 @@ impl<L: PageTableLevel> PageTableMethods for PageTable<L> {
386382 let index = page. table_index :: < L > ( ) ;
387383 let flush = self . entries [ index] . is_present ( ) ;
388384
389- if physical_address. is_null ( ) {
385+ if physical_address. is_null ( ) && flags == PageTableEntryFlags :: BLANK {
390386 // Clear PTE
391387 self . entries [ index] . unset ( )
392388 } else {
You can’t perform that action at this time.
0 commit comments