소스 검색

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

greatbridf 7 달 전
부모
커밋
576c43db2d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;
         }