> Do we really need the new MMF_DUMP_STARTED flag? We are holding ->mmap_sem, > can't we check "mm->core_waiters != 0" instead?
Yes, I think you're right. I gave the old use of dumpable the benefit of the doubt as being needed for synchronization, but that would be enough too. > Hmm. Actually, do we need any check? If another thread (or CLONE_VM task) > already started do_coredump(), we must see SIGNAL_GROUP_EXIT when we take > ->mmap_sem. In that case coredump_wait() does nothing but returns -EAGAIN. You're right again here. I'm sure the old use predates this checking in zap_threads, so it's understandable that something different was needed for this synchronization before. > > - set_dumpable(mm, 0); > > Looks like this change is all we need, no? The only problem is that we > return -EAGAIN if we race with another thread (the current code returns 0), > but nobody checks the returned value. I concur. It merits a comment at the coredump_wait call that this takes care of all synchronization issues including races to enter do_coredump. Thanks, Roland - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/