On Thu, 28 Aug 2025 at 17:11, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > What I want to avoid is compiler seeing something like > (unsigned long)READ_ONCE(m->mnt_pprev_for_sb) & 1 > and going "that thing is a pointer to struct mount *, either the address > is even or it's an undefined behaviour and I can do whatever I want > anyway; optimize it to 0". Have you actually seen that? Because if some compiler does this, we have tons of other places that will hit this, and we'll need to try to figure out some generic solution, or - more likely - just disable said compiler "optimization". And if you really want to deal with this theoretical issue, please just use a union for it, having both the proper pointer type and the 'unsigned long', and using the appropriate field instead of any type casts. Linus