Messages in this thread | ![/](/images/icornerl.gif) | | Date | Thu, 29 Aug 2019 17:39:42 +0200 | From | Alexandre Belloni <> | Subject | Re: [PATCH] rtc: snvs: fix possible race condition |
| |
On 16/07/2019 15:18:58+0800, Anson.Huang@nxp.com wrote: > From: Anson Huang <Anson.Huang@nxp.com> > > The RTC IRQ is requested before the struct rtc_device is allocated, > this may lead to a NULL pointer dereference in IRQ handler. > > To fix this issue, allocating the rtc_device struct before requesting > the RTC IRQ using devm_rtc_allocate_device, and use rtc_register_device > to register the RTC device. > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com> > --- > drivers/rtc/rtc-snvs.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > Applied, thanks.
-- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
| ![\](/images/icornerr.gif) |