From dee7734073bf045bf53d22add72407ce6b4ab905 Mon Sep 17 00:00:00 2001 From: Ruihan Li Date: Wed, 31 Jul 2024 15:59:20 +0800 Subject: [PATCH] Fix a missed `write_volatile` in `VmWriter` --- ostd/src/mm/io.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ostd/src/mm/io.rs b/ostd/src/mm/io.rs index a4bdc385b..eb7d4652d 100644 --- a/ostd/src/mm/io.rs +++ b/ostd/src/mm/io.rs @@ -574,7 +574,7 @@ impl<'a> VmWriter<'a, KernelSpace> { // hence the `add` operation and `write` operation are valid and will only manipulate // the memory managed by this writer. unsafe { - (self.cursor as *mut T).add(i).write(value); + (self.cursor as *mut T).add(i).write_volatile(value); } }