Re: [PATCH] drivers/rtc/interface.c: Validate alarm-time before handling rollover

2017-05-31 Thread Alexandre Belloni
On 19/05/2017 at 22:18:55 +0530, Vaibhav Jain wrote: > In function __rtc_read_alarm() its possible for an alarm time-stamp to > be invalid even after replacing missing components with current > time-stamp. The condition 'alarm->time.tm_year < 70' will trigger this > case and will cause the call to

[PATCH] drivers/rtc/interface.c: Validate alarm-time before handling rollover

2017-05-19 Thread Vaibhav Jain
In function __rtc_read_alarm() its possible for an alarm time-stamp to be invalid even after replacing missing components with current time-stamp. The condition 'alarm->time.tm_year < 70' will trigger this case and will cause the call to 'rtc_tm_to_time64(&alarm->time)' return a negative value for