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] [day] [month] [year] [list]
Date:	Fri, 22 Nov 2013 12:17:16 -0800
From:	Sameer Nanda <snanda@...omium.org>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Michal Hocko <mhocko@...e.cz>,
	Sergey Dyasly <dserrg@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] signals: change do_signal_stop/do_sigaction to use while_each_thread()

On Fri, Nov 22, 2013 at 11:18 AM, Oleg Nesterov <oleg@...hat.com> wrote:
> Change do_signal_stop() and do_sigaction() to avoid next_thread()
> and use while_each_thread() instead.
>
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
Reviewed-by: Sameer Nanda <snanda@...omium.org>

> ---
>  kernel/signal.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/signal.c b/kernel/signal.c
> index ded28b9..086071d 100644
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -2047,8 +2047,8 @@ static bool do_signal_stop(int signr)
>                 if (task_set_jobctl_pending(current, signr | gstop))
>                         sig->group_stop_count++;
>
> -               for (t = next_thread(current); t != current;
> -                    t = next_thread(t)) {
> +               t = current;
> +               while_each_thread(current, t) {
>                         /*
>                          * Setting state to TASK_STOPPED for a group
>                          * stop is always done with the siglock held,
> @@ -3125,8 +3125,7 @@ int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)
>                         rm_from_queue_full(&mask, &t->signal->shared_pending);
>                         do {
>                                 rm_from_queue_full(&mask, &t->pending);
> -                               t = next_thread(t);
> -                       } while (t != current);
> +                       } while_each_thread(current, t);
>                 }
>         }
>
> --
> 1.5.5.1
>



-- 
Sameer
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ