Re: [PATCH v2] rtc: cmos: zero-init wkalrm when reading from CMOS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 14 Aug 2020 19:17:30 +1000, Victor Ding wrote:
> cmos_read_alarm() may leave certain fields of a struct rtc_wkalrm
> untouched; therefore, these fields contain garbage if not properly
> initialized, leading to inconsistent values when converting into
> time64_t. This patch to zero initialize the struct before calling
> cmos_read_alarm().
> 
> Note that this patch is not intended to produce a correct time64_t, it
> is only to produce a consistent value. In the case of suspend/resume, a
> correct time64_t is not necessary; a consistent value is sufficient to
> correctly perform an equality test for t_current_expires and
> t_saved_expires. Logic to deduce a correct time64_t is expensive and
> hence should be avoided.

Applied, thanks!

[1/1] rtc: cmos: zero-init wkalrm when reading from CMOS
      commit: c254bcd7231a3eeafc453f6ee3a483a2e7ff486e

Best regards,
-- 
Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux