[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3071133.ssTx2e0NSm@wuerfel>
Date: Wed, 23 Mar 2016 14:28:10 +0100
From: Arnd Bergmann <arnd@...db.de>
To: y2038@...ts.linaro.org
Cc: Tina Ruchandani <ruchandani.tina@...il.com>,
Kalle Valo <kvalo@...eaurora.org>, netdev@...r.kernel.org,
linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [Y2038] [PATCH v2] prism54: isl_38xx: Replace 'struct timeval'
On Tuesday 22 March 2016 15:16:15 Tina Ruchandani wrote:
> 'struct timeval' uses a 32-bit seconds field which will overflow in
> year 2038 and beyond. This patch is part of a larger effort to remove
> all instances of 'struct timeval' from the kernel and replace them
> with 64-bit timekeeping variables.
> The correctness of the code isn't affected by this patch - the seconds
> value being printed would earlier be wrong due to overflow in timeval,
> and now it gets truncated to 32-bit due to the 'long' cast used on
> tv.sec field to prevent compiler warnings. Truly fixing this would
> require changing the debug print to print more than 8 digits and
> use a different specifier from %li.
> The patch was build-tested / debugged by removing the
> "if VERBOSE > SHOW_ERROR_MESSAGES" guards.
>
> Signed-off-by: Tina Ruchandani <ruchandani.tina@...il.com>
> Suggested-by: Arnd Bergmann <arnd@...db.de>
> --
> Changes in v2:
> - Changed printf specifier as suggested by Arnd Bergmann to
> avoid truncation.
>
The patch looks great now, but it no longer matches the description,
as you actually fix the correctness.
Arnd
Powered by blists - more mailing lists