On Mon, 19 Oct 2015, Kirill A. Shutemov wrote:
I think we need to have at lease WRITE_ONCE() everywhere we update vm_flags and READ_ONCE() where we read it without mmap_sem taken.
Given the CPU-CPU interaction, lockless/racy vm_flag checks should actually be using barrier pairing, afaict. This is expensive obviously, but I cannot recall what other places we do lockless games with vm_flags. Perhaps its time to introduce formal helpers around vma->vm_flags such that we can encapsulate such things: __vma_[set/read]_vmflags() or whatever that would be used for those racy scenarios. Thanks, Davidlohr -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>