lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <05cd01d47800$e52669a0$af733ce0$@lge.com>
Date:   Fri, 9 Nov 2018 16:50:33 +0900
From:   "Chanho Min" <chanho.min@....com>
To:     "'Oleg Nesterov'" <oleg@...hat.com>
Cc:     "'Rafael J. Wysocki'" <rjw@...ysocki.net>,
        "'Pavel Machek'" <pavel@....cz>,
        "'Len Brown'" <len.brown@...el.com>,
        "'Andrew Morton'" <akpm@...ux-foundation.org>,
        "'Eric W. Biederman'" <ebiederm@...ssion.com>,
        "'Christian Brauner'" <christian@...uner.io>,
        "'Anna-Maria Gleixner'" <anna-maria@...utronix.de>,
        <linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        "'Seungho Park'" <seungho1.park@....com>,
        "'Jongsung Kim'" <neidhard.kim@....com>,
        "'Inkyu Hwang'" <inkyu.hwang@....com>,
        "'donghwan.jung'" <donghwan.jung@....com>
Subject: RE: [PATCH] freezer: fix freeze timeout on exec

> >
> > Can't we simply change de_thread() to use freezable_schedule() ?
> >
> > Oleg.
> 
> We need to change freezable_schedule_timeout() instead.
> freezable_schedule also can't be frozen if sub-threads can't stop
> schedule().
> Furthermore, I'm not sure if it is safe to freeze it at de_thread().
> 
> diff --git a/fs/exec.c b/fs/exec.c
> index 9c5ee2a..291cbd6 100644
> --- a/fs/exec.c
> +++ b/fs/exec.c
> @@ -942,7 +942,7 @@ static int de_thread(struct task_struct *tsk)
>         while (sig->notify_count) {
>                 __set_current_state(TASK_KILLABLE);
>                 spin_unlock_irq(lock);
> -               schedule();
> +               while (!freezable_schedule_timeout(HZ));
>                 if (unlikely(__fatal_signal_pending(tsk)))
>                         goto killed;
>                 spin_lock_irq(lock);
> 
> Chanho

Sorry, I might misunderstand freezer.
Changes to freezable_schedule() works fine. It looks safe.
I'll apply patch again.

Chanho

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ