Messages in this thread | | | Date | Thu, 12 Dec 2019 12:05:14 +0100 | From | Christian Brauner <> | Subject | Re: [PATCH] kernel/exit: do panic earlier to get coredump if global init task exit |
| |
On Thu, Dec 12, 2019 at 11:08:38AM +0100, Oleg Nesterov wrote: > can't you use is_global_init() && group_dead ?
Seems reasonable. Looks like we can move group_dead = atomic_dec_and_test(&tsk->signal->live); further up...
(Ideally I'd like to have a test for this to ensure that this lets you capture a global init coredump but that might be tricky. But since you've seem to have run into this case maybe you even have something that could be turned into a test? (Similar to how we already have a purely opt-in test for pstore.))
Christian
| |