Messages in this thread | | | Date | Mon, 4 Jun 2018 14:31:24 +0200 | From | Maxime Ripard <> | Subject | Re: [PATCH] rtc: sunxi: fix possible race condition |
| |
On Mon, Jun 04, 2018 at 02:05:40PM +0200, Alexandre Belloni wrote: > The IRQ is requested before the struct rtc is allocated and registered, but > this struct is used in the IRQ handler. This may lead to a NULL pointer > dereference. > > Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc > before requesting the IRQ. > > Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Maxime
-- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com [unhandled content-type:application/pgp-signature] | |