On Mon, Sep 09, 2019 at 10:10:00PM +0800, zhengbin (A) wrote: Hmm... So your theory is that what you are seeing is the insertion into the list done by list_add() exposing an earlier ->next pointer to those who might be doing lockless walk through the list. Potentially up to the last barrier done before the list_add()... > We can solute it in 2 ways: > > 1. add a smp_wmb between __d_alloc and list_add(&dentry->d_child, &parent->d_subdirs) > 2. revert commit ebaaa80e8f20 ("lockless next_positive()") I want to take another look at the ->d_subdirs/->d_child readers... I agree that the above sounds plausible, but I really want to be sure about the exclusion we have for those accesses. I'm not sure that smp_wmb() alone would suffice, BTW - the reader side loop would need to be careful as well. Which architecture it was, again? arm64?