aboutsummaryrefslogtreecommitdiff
path: root/lib/test_overflow.c
diff options
context:
space:
mode:
authorAnson Huang <[email protected]>2019-07-16 15:18:58 +0800
committerAlexandre Belloni <[email protected]>2019-08-29 17:53:12 +0200
commit6fd4fe9b496d9ba3382992ff4fde3871d1b6f63d (patch)
tree41aa0933b5122855eb9c52d516e0eb362c6497ab /lib/test_overflow.c
parent28abbba36a5a9f35bfaa75bf8ee0ebf2fe40b9e3 (diff)
rtc: snvs: fix possible race condition
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 <[email protected]> Reviewed-by: Dong Aisheng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions