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: <CAFj5m9JitO0sgmq+Viu5xX-VSCwBO_7=x3iDmF=+D6rXV7aPwA@mail.gmail.com>
Date: Fri, 6 Sep 2024 09:36:30 +0800
From: Ming Lei <ming.lei@...hat.com>
To: Costa Shulyupin <costa.shul@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] genirq: use cpumask_intersects

On Wed, Sep 4, 2024 at 9:49 PM Costa Shulyupin <costa.shul@...hat.com> wrote:
>
> Replace `cpumask_any_and(a, b) >= nr_cpu_ids`
> with more readable `!cpumask_intersects(a, b)`.
>
> Signed-off-by: Costa Shulyupin <costa.shul@...hat.com>
> ---
>  kernel/irq/cpuhotplug.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/irq/cpuhotplug.c b/kernel/irq/cpuhotplug.c
> index eb86283901565..15a7654eff684 100644
> --- a/kernel/irq/cpuhotplug.c
> +++ b/kernel/irq/cpuhotplug.c
> @@ -37,7 +37,7 @@ static inline bool irq_needs_fixup(struct irq_data *d)
>          * has been removed from the online mask already.
>          */
>         if (cpumask_any_but(m, cpu) < nr_cpu_ids &&
> -           cpumask_any_and(m, cpu_online_mask) >= nr_cpu_ids) {
> +           !cpumask_intersects(m, cpu_online_mask)) {
>                 /*
>                  * If this happens then there was a missed IRQ fixup at some
>                  * point. Warn about it and enforce fixup.
> @@ -110,7 +110,7 @@ static bool migrate_one_irq(struct irq_desc *desc)
>         if (maskchip && chip->irq_mask)
>                 chip->irq_mask(d);
>
> -       if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
> +       if (!cpumask_intersects(affinity, cpu_online_mask)) {
>                 /*
>                  * If the interrupt is managed, then shut it down and leave
>                  * the affinity untouched.

Looks fine,

Reviewed-by: Ming Lei <ming.lei@...hat.com>

Thanks,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ