Return-Path: Received: from mail.parknet.co.jp ([210.171.160.6]:54108 "EHLO mail.parknet.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751127AbbKYS4V (ORCPT ); Wed, 25 Nov 2015 13:56:21 -0500 From: OGAWA Hirofumi To: Jan Kara Cc: linux-fsdevel@vger.kernel.org, list0570@paradise.net.nz Subject: Re: [PATCH] fat: Allow time_offset to be upto 13 hours References: <1448466133-2838-1-git-send-email-jack@suse.cz> Date: Thu, 26 Nov 2015 03:32:52 +0900 In-Reply-To: <1448466133-2838-1-git-send-email-jack@suse.cz> (Jan Kara's message of "Wed, 25 Nov 2015 16:42:13 +0100") Message-ID: <87wpt60w17.fsf@mail.parknet.co.jp> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Jan Kara writes: > Currently we limit values of time_offset mount option to be between -12 > and 12 hours. However e.g. zone GMT+12 can have a DST correction on top > which makes the total time difference 13 hours. Update the checks in > mount option parsing to allow offset of upto 13 hours. Hmmm, 13 is where come from? TZ environment (of course, has much more complex format though. see tzset(3)) offset is +-24 hours (total different can have more than 24). Well, so I feel, more or less, 12 is sane, and also 24 is sane. But I'm not sure why 13? Thanks. > Reported-by: Volker Kuhlmann > Signed-off-by: Jan Kara > --- > fs/fat/inode.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/fs/fat/inode.c b/fs/fat/inode.c > index 509411dd3698..2041031ab1c8 100644 > --- a/fs/fat/inode.c > +++ b/fs/fat/inode.c > @@ -1146,7 +1146,11 @@ static int parse_options(struct super_block *sb, char *options, int is_vfat, > case Opt_time_offset: > if (match_int(&args[0], &option)) > return -EINVAL; > - if (option < -12 * 60 || option > 12 * 60) > + /* > + * Allow for GMT+-12 zones to have DST like > + * corrections > + */ > + if (option < -13 * 60 || option > 13 * 60) > return -EINVAL; > opts->tz_set = 1; > opts->time_offset = option; -- OGAWA Hirofumi