Just to clarify a hopefully obvious issue..
The assumption here is that you don't protect things with locking. Of
course, if all people accessing the new pointer always have the
appropriate lock, then memory ordering never matters, since the locks take
care of it.
So _most_ allocators obviously don't need to do any smp_wmb() at all. But
the ones that expose things locklessly (where page tables are just one
example) need to worry.
Again, this is yet another reason to not put things in the allocator. The
allocator cannot know, and shouldn't care. For all the exact same reasons
that the allocator cannot know and shouldn't care whether the ctor results
in a 'final' version or whether the allocator will do some final fixups.
Linus
--