coredump: move mm->core_waiters into struct core_state
Move mm->core_waiters into "struct core_state" allocated on stack. This shrinks mm_struct a little bit and allows further changes. This patch mostly does s/core_waiters/core_state. The only essential change is that coredump_wait() must clear mm->core_state before return. The coredump_wait()'s path is uglified and .text grows by 30 bytes, this is fixed by the next patch. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
32ecb1f26d
commit
999d9fc167
@@ -1480,10 +1480,10 @@ static inline int may_ptrace_stop(void)
|
||||
* is a deadlock situation, and pointless because our tracer
|
||||
* is dead so don't allow us to stop.
|
||||
* If SIGKILL was already sent before the caller unlocked
|
||||
* ->siglock we must see ->core_waiters != 0. Otherwise it
|
||||
* ->siglock we must see ->core_state != NULL. Otherwise it
|
||||
* is safe to enter schedule().
|
||||
*/
|
||||
if (unlikely(current->mm->core_waiters) &&
|
||||
if (unlikely(current->mm->core_state) &&
|
||||
unlikely(current->mm == current->parent->mm))
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user