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:	Tue, 12 May 2015 09:55:47 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Geert Uytterhoeven <geert+renesas@...der.be>,
	hisashi.nakamura.ak@...esas.com,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Valentine <valentine.barshak@...entembedded.com>,
	Magnus Damm <magnus.damm@...il.com>
Cc:	Alexandre Courbot <gnurou@...il.com>,
	Marc Zyngier <marc.zyngier@....com>,
	Axel Haslam <ahaslam@...libre.com>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"linux-sh@...r.kernel.org" <linux-sh@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: rcar: Check for irq_set_irq_wake() failures

On Mon, May 4, 2015 at 4:09 PM, Geert Uytterhoeven
<geert+renesas@...der.be> wrote:

> If an interrupt controller doesn't support wake-up configuration, trying
> to deconfigure wake-up will cause a warning:
>
>     WARNING: CPU: 1 PID: 1341 at kernel/irq/manage.c:540 irq_set_irq_wake+0x9c/0xf8()
>     Unbalanced IRQ 26 wake disable
>
> To fix this, refrain from any further parent interrupt controller
> (de)configuration if irq_set_irq_wake() failed.
>
> Fixes: ab82fa7da4dce5c7 ("gpio: rcar: Prevent module clock disable when wake-up is enabled")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
> ---
> This is an alternative for:
>   - calling "gic_set_irqchip_flags(IRQCHIP_SKIP_SET_WAKE)" from the
>     platform code, OR
>   - setting "gic_chip.flags = IRQCHIP_SKIP_SET_WAKE" in the GIC driver
>     code.

This should be moved to the commit message I think.

> -       irq_set_irq_wake(p->irq_parent, on);
> +       int error;
> +
> +       if (p->irq_parent) {
> +               error = irq_set_irq_wake(p->irq_parent, on);
> +               if (error) {
> +                       dev_dbg(&p->pdev->dev,
> +                               "irq %u doesn't support irq_set_wake\n",
> +                               p->irq_parent);
> +                       p->irq_parent = 0;
> +               }
> +       }

Does the SH maintainers really like this... Warning
appear once and is squelched.

Isn't it better to make sure it doesn't happen or something.

It looks hacky. Any other suggestions?

Also, please convert this driver to use GPIOLIB_IRQCHIP
like everyone else.

Yours,
Linus Walleij
--
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