diff --git a/kernel/src/arch/riscv/mem.rs b/kernel/src/arch/riscv/mem.rs index b26a75ccd..2dc59d466 100644 --- a/kernel/src/arch/riscv/mem.rs +++ b/kernel/src/arch/riscv/mem.rs @@ -584,7 +584,7 @@ pub fn virt_to_phys(virt: usize) -> Result { } // If the page is "Valid" but shared, issue a sharing violation - if l0_pt.entries[vpn0] & MMUFlags::S.bits() == 0 { + if l0_pt.entries[vpn0] & MMUFlags::S.bits() == 1 { return Err(xous_kernel::Error::ShareViolation); }