Эх сурвалжийг харах

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

greatbridf 7 сар өмнө
parent
commit
576c43db2d

+ 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;
         }