Re: [PATCH] rust: fs, hrtimer: replace read_volatile workarounds with atomic_load
From: Gary Guo
Date: Sun Jul 12 2026 - 09:41:25 EST
On Sun Jul 12, 2026 at 1:34 PM BST, Alessio Maroni wrote:
> Please disregard this patch.
>
> As pointed out by the Sashiko AI review, using `atomic_load` here
> introduces critical alignment issues on 32-bit platforms for ktime_t
> and violates the safety contract regarding concurrent non-atomic stores
> on the C side.
>
> We definitely need a proper `read_once` abstraction in Rust before
> handling these cases. Sorry for the noise!
The symptom is correct but your conclusion is wrong. Tearing is not allowed for
hrtimer!
This is already being worked on, though:
https://lore.kernel.org/rust-for-linux/20260303061000.73970-1-tomo@xxxxxxxxxxxx/
Best,
Gary