lkml.org 
[lkml]   [2017]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/2] isofs: fix timestamps beyond 2027
On Thu 19-10-17 17:29:12, Arnd Bergmann wrote:
> On Thu, Oct 19, 2017 at 5:17 PM, Jan Kara <jack@suse.cz> wrote:
> > On Thu 19-10-17 16:47:48, Arnd Bergmann wrote:
> >> isofs uses a 'char' variable to load the number of years since
> >> 1900 for an inode timestamp. On architectures that use a signed
> >> char type by default, this results in an invalid date for
> >> anything beyond 2027.
> >>
> >> This changes the function argument to a 'u8' array, which
> >> is defined the same way on all architectures, and unambiguously
> >> lets us use years until 2155.
> >>
> >> This should be backported to all kernels that might still be
> >> in use by that date.
> >>
> >> Cc: stable@vger.kernel.org
> >> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ...
> >> -int iso_date(char * p, int flag)
> >> +int iso_date(u8 *p, int flag)
> >> {
> >> int year, month, day, hour, minute, second, tz;
> >> int crtime;
> >>
> >> - year = p[0];
> >> + year = (int)(u8)p[0];
> >
> > The cast seems unnecessary now?
> >
>
> Sorry, I must have rebased the patch incorrectly, this was intended to
> be removed
> of course.

OK, I've picked up this patch to my tree with this correction.

Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR

\
 
 \ /
  Last update: 2017-10-31 18:00    [W:0.080 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site