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, 22 Nov 2016 12:59:14 +0000
From:   Lee Jones <lee.jones@...aro.org>
To:     Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
Cc:     linux-kernel@...r.kernel.org, patches@...nsource.wolfsonmicro.com
Subject: Re: [PATCH 2/3] mfd: arizona: Disable IRQs during driver remove

On Mon, 14 Nov 2016, Charles Keepax wrote:

> As DCVDD will often be supplied by a child node of the MFD, we
> can't call mfd_remove_devices as the first step in arizona_dev_exit
> as might be expected (tidy up the children before we tidy up the
> MFD). We need to disable and put the DCVDD regulator before we call
> mfd_remove_devices, to prevent PM runtime from turning this back on we
> also need to disable the PM runtime before we do this. Finally we can
> not clean up the IRQs until all the MFD children have been removed, as
> they may have registered IRQs themselves.
> 
> This creates a window of time where the interrupts are enabled but
> the PM runtime, on which the IRQ handler depends, is not available,
> any interrupts in this window will go unhandled and fill the log with
> failed to resume device messages. To avoid this we simply disable the
> main IRQ at the start of arizona_dev_exit, we don't need to actually
> handle any IRQs in this window as we are removing the driver.
> 
> Signed-off-by: Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
> ---
>  drivers/mfd/arizona-core.c | 1 +
>  1 file changed, 1 insertion(+)

I'm convinced.

Applied, thanks.

> diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
> index 41767f7..b6d4bc6 100644
> --- a/drivers/mfd/arizona-core.c
> +++ b/drivers/mfd/arizona-core.c
> @@ -1553,6 +1553,7 @@ EXPORT_SYMBOL_GPL(arizona_dev_init);
>  
>  int arizona_dev_exit(struct arizona *arizona)
>  {
> +	disable_irq(arizona->irq);
>  	pm_runtime_disable(arizona->dev);
>  
>  	regulator_disable(arizona->dcvdd);

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ