Re: [PATCH] core dump: remain dumpable

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Roland McGrath <roland@...>
Cc: Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, <linux-kernel@...>
Date: Thursday, October 11, 2007 - 6:25 am

On 10/10, Roland McGrath wrote:

I don't understand why do_coredump() clears DUMPABLE too.


Do we really need the new MMF_DUMP_STARTED flag? We are holding ->mmap_sem,
can't we check "mm->core_waiters != 0" instead?

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.


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.

What do you think?

Oleg.

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] core dump: remain dumpable, Roland McGrath, (Thu Oct 11, 2:27 am)
[PATCH] core dump: remain dumpable, Roland McGrath, (Sun Nov 11, 11:13 pm)
Re: [PATCH] core dump: remain dumpable, Oleg Nesterov, (Thu Oct 11, 6:25 am)
Re: [PATCH] core dump: remain dumpable, Roland McGrath, (Thu Oct 11, 6:34 am)
Re: [PATCH] core dump: remain dumpable, Oleg Nesterov, (Thu Oct 11, 6:49 am)
Re: [PATCH] core dump: remain dumpable, Roland McGrath, (Thu Oct 11, 6:51 am)