Commit e8ba8a2
rtc: check if __rtc_read_time was successful in rtc_timer_do_work()
If the __rtc_read_time call fails,, the struct rtc_time tm; may contain
uninitialized data, or an illegal date/time read from the RTC hardware.
When calling rtc_tm_to_ktime later, the result may be a very large value
(possibly KTIME_MAX). If there are periodic timers in rtc->timerqueue,
they will continually expire, may causing kernel softlockup.
Fixes: 6610e08 ("RTC: Rework RTC code to use timerqueue for events")
Signed-off-by: Yongliang Gao <[email protected]>
Acked-by: Jingqun Li <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Belloni <[email protected]>1 parent 00f1bb9 commit e8ba8a2
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
904 | 904 | | |
905 | 905 | | |
906 | 906 | | |
| 907 | + | |
907 | 908 | | |
908 | 909 | | |
909 | 910 | | |
910 | 911 | | |
911 | 912 | | |
912 | 913 | | |
913 | | - | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
914 | 919 | | |
915 | 920 | | |
916 | 921 | | |
| |||
0 commit comments