[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140408164302.0f7c51b7@linux.lan.towertech.it>
Date: Tue, 8 Apr 2014 16:43:02 +0200
From: Alessandro Zummo <a.zummo@...ertech.it>
To: Ales Novak <alnovak@...e.cz>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
rtc-linux@...glegroups.com, linux-kernel@...r.kernel.org,
Jiri Kosina <jkosina@...e.cz>,
John Stultz <john.stultz@...aro.org>
Subject: Re: [PATCH] RTC: Fix infinite loop in initializing the alarm.
On Tue, 8 Apr 2014 00:54:42 +0200
Ales Novak <alnovak@...e.cz> wrote:
> In __rtc_read_alarm(), if the alarm time retrieved by
> rtc_read_alarm_internal() from the device contains invalid values
> (e.g. month=2,mday=31) and the year not set (=-1), the initialization
> will loop infinitely because the year-fixing loop expects the
> time being invalid due to leap year.
>
> Fix reduces the loop to the leap years and adds final validity check.
>
> Signed-off-by: Ales Novak <alnovak@...e.cz>
Seems reasonable.
Acked-by: Alessandro Zummo <a.zummo@...ertech.it>
--
Best regards,
Alessandro Zummo,
Tower Technologies - Torino, Italy
http://www.towertech.it
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists