Re: [PATCH 2/2] mm/madvise: add process_madvise MADV_DONTNEER support

From: Suren Baghdasaryan
Date: Tue Nov 24 2020 - 11:43:02 EST


On Tue, Nov 24, 2020 at 5:42 AM Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>
> On 11/23, Suren Baghdasaryan wrote:
> >
> > + if (madvise_destructive(behavior)) {
> > + /* Allow destructive madvise only on a dying processes */
> > + if (!signal_group_exit(task->signal)) {
>
> signal_group_exit(task) is true if this task execs and kills other threads,
> see the comment above this helper.
>
> I think you need !(task->signal->flags & SIGNAL_GROUP_EXIT).

I see. Thanks for the feedback, Oleg. I'll test and fix it in the next version.

>
> Oleg.
>