Explorar o código

fix(CoW): check both PRESENT and MAPPED bits when doing cow

greatbridf hai 7 meses
pai
achega
576c43db2d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/kernel/mem/mm_list.rs

+ 1 - 1
src/kernel/mem/mm_list.rs

@@ -753,7 +753,7 @@ where
             .as_page_attr()
             .expect("Not a page attribute");
 
-        if !from_attr.contains(PageAttribute::PRESENT) {
+        if !from_attr.intersects(PageAttribute::PRESENT | PageAttribute::MAPPED) {
             return;
         }