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: <CAEExFWtRODbGeeP=hNDm9FQz-MRb5Dp+Ph=7a_Yb5WGrEjND0A@mail.gmail.com>
Date:   Fri, 9 Nov 2018 01:58:02 +0800
From:   Frank Lee <tiny.windzz@...il.com>
To:     mingo@...hat.com, peterz@...radead.org, mingo@...nel.org
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched/core: remove unnecessary unlikely() in push_xx_task

Hi mingo:
    What is your point of view?
--Yangtao

On Sun, Nov 4, 2018 at 1:26 AM Yangtao Li <tiny.windzz@...il.com> wrote:
>
> WARN_ON() already contains an unlikely(), so it's not necessary to
> use WARN_ON(1).
>
> Signed-off-by: Yangtao Li <tiny.windzz@...il.com>
> ---
>  kernel/sched/deadline.c | 4 +---
>  kernel/sched/rt.c       | 4 +---
>  2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index 91e4202b0634..8b5d964d59c5 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -2041,10 +2041,8 @@ static int push_dl_task(struct rq *rq)
>                 return 0;
>
>  retry:
> -       if (unlikely(next_task == rq->curr)) {
> -               WARN_ON(1);
> +       if (WARN_ON(next_task == rq->curr))
>                 return 0;
> -       }
>
>         /*
>          * If next_task preempts rq->curr, and rq->curr
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index 2e2955a8cf8f..0efd58563c80 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -1810,10 +1810,8 @@ static int push_rt_task(struct rq *rq)
>                 return 0;
>
>  retry:
> -       if (unlikely(next_task == rq->curr)) {
> -               WARN_ON(1);
> +       if (WARN_ON(next_task == rq->curr))
>                 return 0;
> -       }
>
>         /*
>          * It's possible that the next_task slipped in of
> --
> 2.17.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ