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
| ||
|
Date: Fri, 11 Jan 2019 15:31:41 +0100 From: Alexandre Belloni <alexandre.belloni@...tlin.com> To: Anson Huang <anson.huang@....com> Cc: "a.zummo@...ertech.it" <a.zummo@...ertech.it>, "linux-rtc@...r.kernel.org" <linux-rtc@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, dl-linux-imx <linux-imx@....com> Subject: Re: [PATCH] rtc: snvs: make sure clock is enabled for interrupt handle Hi, On 11/01/2019 07:09:02+0000, Anson Huang wrote: > During system suspend, the SNVS RTC's clock will be disabled in > noirq suspend phase, but SNVS RTC's alarm interrupt could still > arrive, system will hang if SNVS RTC driver tries to access register > without clock enabled, this patch fixes the issue of this scenario. > Are you sure this is the real issue? I don't think the handler can be called before the resume_noirq callback. Isn't the issue that your clock driver has not yet resumed by the time you call the rtc driver resume_noirq callback ? > Signed-off-by: Anson Huang <Anson.Huang@....com> > --- > drivers/rtc/rtc-snvs.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c > index b2483a7..0b9eff1 100644 > --- a/drivers/rtc/rtc-snvs.c > +++ b/drivers/rtc/rtc-snvs.c > @@ -239,6 +239,9 @@ static irqreturn_t snvs_rtc_irq_handler(int irq, void *dev_id) > u32 lpsr; > u32 events = 0; > > + if (data->clk) > + clk_enable(data->clk); > + Anyway, won't that need a clk_prepare_enable because it has been clk_disable_unprepare in suspend_noirq? And this is something you can not do in atomic context -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Powered by blists - more mailing lists