> Here this loops begin by > > someptr = rcu_dereference(somelocation); > > May claim is rcu_dereference() should force the compiler to read again > somelocation. Its done thanks to ACCESS_ONCE(). But apparently in the > specific case of &hslot->head, it doesnt work. Hmmm.... #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) That might be doomed to fail for much the same reason as: void x(struct foo *unaligned_ptr) { char *p = (void *)unaligned_ptr; memcpy(tgt, p, sizeof *p); } generates alignment faults. And that casts to a union type don't get around 'strict aliasing'. Basically the compiler makes use of the fact that you should cast addresses back to their original type before dereferencing them. So I'm not sure you can use a cast to add a type qualifier. The front-end lets you remove 'const', but I suspect the optimiser is using the original types. David {.n++%ݶw{.n+{G{ayʇڙ,jfhz_(階ݢj"mG?&~iOzv^m ?I