On Sun, Mar 9, 2014 at 5:57 AM, Oleg Nesterov <o...@redhat.com> wrote: > > No, dup_task_struct() is obviously lockless. And the new child is not yet > visible to for_each_process_thread().
Ok, then the siimple approach is to just do /* Did we miss an invalidate event? * if (mm->seqcount < tsk->seqcount) clear_vma_cache(); after making the new thread visible. Then the "race" becomes one of "we cannot have 4 billion mmap/munmap events in other threads while we're setting up a new thread", which I think is fine. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/