Sorry, I'm traveling, and right now only on mobile. So I'm reading patches on my phone, and answering on it too, so html garbage..
On Wed, Jan 11, 2023, 07:24 Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> wrote:
+static inline unsigned long mm_lam_cr3_mask(struct mm_struct *mm)
+{
+ return READ_ONCE(mm->context.lam_cr3_mask);
+}
I mentioned this before - in the original version this needed (but didn't have, iirc) that READ_ONCE, but in the new non-thread situation I don't think that's true. There should be no concurrent changes that can interfere with the read, no?
If there is a reason for that READ_ONCE still, please add a comment for it
Linus