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: <20100810134055.GC4268@pengutronix.de>
Date:	Tue, 10 Aug 2010 15:40:55 +0200
From:	Wolfram Sang <w.sang@...gutronix.de>
To:	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>
Cc:	rtc-linux@...glegroups.com,
	Durgesh Pattamatta <durgesh.pattamatta@....com>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	Kevin Wells <wellsk40@...il.com>
Subject: Re: [rtc-linux] [PATCH 1/2] rtc: rtc-lpc32xx: Introduce RTC driver
 for the LPC32XX SoC

On Tue, Aug 10, 2010 at 02:00:55PM +0200, Uwe Kleine-König wrote:
> Hi Wolfram,
> 
> > > +	retval = request_irq(rtc->irq, lpc32xx_rtc_alarm_interrupt,
> > > +		IRQF_DISABLED, "rtcalarm", rtc);
> > > +	if (retval < 0) {
> > > +		dev_err(&pdev->dev, "Can't request interrupt\n");
> > > +		goto err_free_irq;
> > > +	}
> > 
> > I saw that a number of rtc-drivers register their irq after they
> > register the device. I wonder if this is OK here? Couldn't it happen
> > that after rtc_device_register() there is a preemption and another
> > process could set the alarm? Then there is a race between interrupts
> > already enabled and no handler available, no?
> If you do it the other way around the irq might trigger and the handler
> reports an irq for a device that doesn't exist yet.

Well, I was assuming that you initially have all interrupts disabled...

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ