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]
Date:   Thu, 22 Oct 2020 14:51:56 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Tian Tao <tiantao6@...ilicon.com>
Cc:     Niklas Söderlund <niklas.soderlund@...natech.se>,
        Zhang Rui <rui.zhang@...el.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>, amitk@...nel.org,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
        Linux PM list <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] thermal: replace spin_lock_irqsave by spin_lock in hard IRQ

Hi Tian,

CC tglx

On Wed, Oct 21, 2020 at 2:15 PM Tian Tao <tiantao6@...ilicon.com> wrote:
> The code has been in a irq-disabled context since it is hard IRQ. There
> is no necessity to do it again.
>
> Signed-off-by: Tian Tao <tiantao6@...ilicon.com>

Thanks for your patch!

Is this also true if CONFIG_PREEMPT_RT=y, and all irq handlers execute
in the context of special tasks?

> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -409,16 +409,15 @@ static irqreturn_t rcar_thermal_irq(int irq, void *data)
>  {
>         struct rcar_thermal_common *common = data;
>         struct rcar_thermal_priv *priv;
> -       unsigned long flags;
>         u32 status, mask;
>
> -       spin_lock_irqsave(&common->lock, flags);
> +       spin_lock(&common->lock);
>
>         mask    = rcar_thermal_common_read(common, INTMSK);
>         status  = rcar_thermal_common_read(common, STR);
>         rcar_thermal_common_write(common, STR, 0x000F0F0F & mask);
>
> -       spin_unlock_irqrestore(&common->lock, flags);
> +       spin_unlock(&common->lock);
>
>         status = status & ~mask;

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ