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: <20190412101418.GV3578@piout.net>
Date:   Fri, 12 Apr 2019 12:14:18 +0200
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Thomas Bogendoerfer <tbogendoerfer@...e.de>
Cc:     Joshua Kinard <kumba@...too.org>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] rtc: ds1685: disable interrupts when moving work to
 work queue

On 11/04/2019 16:33:23+0200, Thomas Bogendoerfer wrote:
> Handling of extended interrupts (kickstart, wake-up, ram-clear) is
> moved off to a work queue, but the interrupts aren't acknowledged
> in the interrupt handler. This leads to a deadlock, if driver
> is used with interrupts. To fix this we now disable in irq handler
> and re-enable it after work queue is done.
> 

The correct fix to that seems to switch to a threaded interrupt handler.
Can you do that?

> Fixes: aaaf5fbf56f1 ("rtc: add driver for DS1685 family of real time clocks")
> Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@...e.de>
> ---
>  drivers/rtc/rtc-ds1685.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/rtc/rtc-ds1685.c b/drivers/rtc/rtc-ds1685.c
> index 929f28375b87..5dabfa57bd2a 100644
> --- a/drivers/rtc/rtc-ds1685.c
> +++ b/drivers/rtc/rtc-ds1685.c
> @@ -635,6 +635,7 @@ ds1685_rtc_irq_handler(int irq, void *dev_id)
>  			 * to be minimized.  Schedule them into a workqueue
>  			 * and inform the RTC core that the IRQs were handled.
>  			 */
> +			disable_irq_nosync(rtc->irq_num);
>  			spin_unlock(&rtc->lock);
>  			schedule_work(&rtc->work);
>  			rtc_update_irq(rtc->dev, 0, 0);
> @@ -741,6 +742,7 @@ ds1685_rtc_work_queue(struct work_struct *work)
>  	ds1685_rtc_switch_to_bank0(rtc);
>  
>  	mutex_unlock(rtc_mutex);
> +	enable_irq(rtc->irq_num);
>  }
>  /* ----------------------------------------------------------------------- */
>  
> -- 
> 2.13.7
> 

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ