diff options
| author | Ales Novak <[email protected]> | 2014-06-06 14:35:39 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2014-06-06 16:08:06 -0700 |
| commit | ee1d90146815fdc8d653c558b327fff2acba041d (patch) | |
| tree | ed7ce64394d3adcca0974b359b8a2166c360fb9d /tools/perf/scripts/python/netdev-times.py | |
| parent | 3364d113c8209feee425b0f8a770b51e6132c43f (diff) | |
drivers/rtc/interface.c: fix infinite loop in initializing the alarm
In __rtc_read_alarm(), if the alarm time retrieved by
rtc_read_alarm_internal() from the device contains invalid values (e.g.
month=2,mday=31) and the year not set (=-1), the initialization will
loop infinitely because the year-fixing loop expects the time being
invalid due to leap year.
Fix reduces the loop to the leap years and adds final validity check.
Signed-off-by: Ales Novak <[email protected]>
Acked-by: Alessandro Zummo <[email protected]>
Reported-by: Jiri Bohac <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions