Re: [PATCH 1/4] rtc: digicolor: fix possible race condition

2019-04-30 Thread Baruch Siach
Hi Alexandre, On Tue, Apr 30 2019, 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

[PATCH 1/4] rtc: digicolor: fix possible race condition

2019-04-30 Thread Alexandre Belloni
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 struct before requesting the IRQ. Signed-off-by: Alexandre Be