lkml.org 
[lkml]   [2019]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel/exit: do panic earlier to get coredump if global init task exit
can't you use is_global_init() && group_dead ?

On 12/12, Oleg Nesterov wrote:
>
> On 12/12, qiwuchen55@gmail.com wrote:
> >
> > Of course testing signal_group_exit() is not sufficient. It is still
> > possible that this is someone calling exit(2)
>
> Or execve(), so
>
> > @@ -785,6 +781,9 @@ void __noreturn do_exit(long code)
> > panic("Aiee, killing interrupt handler!");
> > if (unlikely(!tsk->pid))
> > panic("Attempted to kill the idle task!");
> > + if (unlikely(is_global_init(tsk) &&
> > + (signal_group_exit(tsk->signal) || thread_group_empty(tsk))))
> > + panic("Attempted to kill init! exitcode=0x%08lx\n", code);
>
> so this can panic() if one of init's threads does does exec.
>
> Oleg.

\
 
 \ /
  Last update: 2019-12-12 11:09    [W:0.044 / U:4.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site