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:	Fri, 24 Apr 2015 13:29:34 +0300
From:	Grygorii Strashko <grygorii.strashko@...com>
To:	Semen Protsenko <semen.protsenko@...ballogic.com>,
	Linus Walleij <linus.walleij@...aro.org>,
	Alexandre Courbot <gnurou@...il.com>
CC:	<linux-gpio@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	Grygorii Strashko <grygorii.strashko@...ballogic.com>
Subject: Re: [PATCH v2] gpio: max732x: Fix irq-events handler

On 04/22/2015 04:20 PM, Semen Protsenko wrote:
> MAX732X clears all pending interrupts on I2C read (when interrupts
> register is being read). Driver doesn't need to send any ACKs when
> interrupt was handled. So replace handle_edge_irq() with
> handle_simple_irq().
>
> Using handle_edge_irq() (w/o .irq_ack callback set) may lead to NULL
> pointer dereference in some cases. E.g. this was observed on
> hibernation process:
>
>    Unable to handle kernel NULL pointer dereference at virtual address 0
>    Backtrace:
>    (handle_edge_irq) from (resend_irqs)
>    (resend_irqs) from (tasklet_action)
>    (tasklet_action) from (__do_softirq)
>    (__do_softirq) from (run_ksoftirqd)
>    (run_ksoftirqd) from (smpboot_thread_fn)
>    (smpboot_thread_fn) from (kthread)
>    (kthread) from (ret_from_fork)
>
> Signed-off-by: Semen Protsenko <semen.protsenko@...ballogic.com>

Reviewed-by: Grygorii Strashko <grygorii.strashko@...aro.org>

> ---
>   drivers/gpio/gpio-max732x.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-max732x.c b/drivers/gpio/gpio-max732x.c
> index 1885e5c..86dc6b3 100644
> --- a/drivers/gpio/gpio-max732x.c
> +++ b/drivers/gpio/gpio-max732x.c
> @@ -530,7 +530,7 @@ static int max732x_irq_setup(struct max732x_chip *chip,
>   		ret =  gpiochip_irqchip_add(&chip->gpio_chip,
>   					    &max732x_irq_chip,
>   					    irq_base,
> -					    handle_edge_irq,
> +					    handle_simple_irq,
>   					    IRQ_TYPE_NONE);
>   		if (ret) {
>   			dev_err(&client->dev,
>

--
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