Re: [RESEND PATCH] rtc: Fix overflow when converting time64_t to rtc_time

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

 



Hi Alexandre,

On 26 January 2018 at 17:24, Arnd Bergmann <arnd@xxxxxxxx> wrote:
> On Fri, Jan 26, 2018 at 6:06 AM, Baolin Wang <baolin.wang@xxxxxxxxxx> wrote:
>> If we convert one large time values to rtc_time, in the original formula
>> 'days * 86400' can be overflowed in 'unsigned int' type to make the formula
>> get one incorrect remain seconds value. Thus we can use div_s64_rem()
>> function to avoid this situation.
>>
>> Signed-off-by: Baolin Wang <baolin.wang@xxxxxxxxxx>
>
> Acked-by: Arnd Bergmann <arnd@xxxxxxxx>

Could you apply this patch? Since it was pending for a while and it is
a bug fix. Thanks.

-- 
Baolin.wang
Best Regards



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

  Powered by Linux