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: <20190708110138.24657-4-masneyb@onstation.org>
Date:   Mon,  8 Jul 2019 07:01:37 -0400
From:   Brian Masney <masneyb@...tation.org>
To:     linus.walleij@...aro.org
Cc:     linux-gpio@...r.kernel.org, bgolaszewski@...libre.com,
        tglx@...utronix.de, marc.zyngier@....com, ilina@...eaurora.org,
        jonathanh@...dia.com, skomatineni@...dia.com, bbiswas@...dia.com,
        linux-tegra@...r.kernel.org, david.daney@...ium.com,
        yamada.masahiro@...ionext.com, treding@...dia.com,
        bjorn.andersson@...aro.org, agross@...nel.org,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 3/4] gpio: use handler in gpio_irq_chip instead of handle_bad_irq

Use the IRQ handler field that's available in the struct gpio_irq_chip
when allocating an IRQ rather than hardcoding the handler to
handle_bad_irq(). The kernel reboots without any messages when testing
this using spmi-gpio on the Nexus 5.

Signed-off-by: Brian Masney <masneyb@...tation.org>
---
I didn't have time to dig into more detail about why this is happening.
I suspect the issue is that __irq_do_set_handler() has a special check
for handle_bad_irq:

https://elixir.bootlin.com/linux/latest/source/kernel/irq/chip.c#L974

My post about this:
https://lore.kernel.org/linux-gpio/20190707014620.GA9690@onstation.org/

 drivers/gpio/gpiolib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 5423242deb81..bc68ebb8f40e 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1872,7 +1872,7 @@ static int gpiochip_hierarchy_irq_domain_alloc(struct irq_domain *d,
 				    hwirq + i,
 				    gc->irq.chip,
 				    gc,
-				    handle_bad_irq,
+				    girq->handler,
 				    NULL, NULL);
 		irq_set_probe(irq + i);
 
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ