diff --git a/kernel/src/arch/riscv/mem.rs b/kernel/src/arch/riscv/mem.rs index 2dc59d466..114886d9e 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() == 1 { + if l0_pt.entries[vpn0] & MMUFlags::S.bits() != 0 { return Err(xous_kernel::Error::ShareViolation); }