From: Alessandro Zummo <a.zummo@towertech.it>
To: Ales Novak <alnovak@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org,
Jiri Kosina <jkosina@suse.cz>,
John Stultz <john.stultz@linaro.org>
Subject: Re: [PATCH] RTC: Fix infinite loop in initializing the alarm.
Date: Tue, 8 Apr 2014 16:43:02 +0200 [thread overview]
Message-ID: <20140408164302.0f7c51b7@linux.lan.towertech.it> (raw)
In-Reply-To: <1396911282-4410-1-git-send-email-alnovak@suse.cz>
On Tue, 8 Apr 2014 00:54:42 +0200
Ales Novak <alnovak@suse.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@suse.cz>
Seems reasonable.
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
--
Best regards,
Alessandro Zummo,
Tower Technologies - Torino, Italy
http://www.towertech.it
next prev parent reply other threads:[~2014-04-08 14:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-07 22:54 [PATCH] RTC: Fix infinite loop in initializing the alarm Ales Novak
2014-04-08 14:43 ` Alessandro Zummo [this message]
2014-05-08 5:56 ` [PATCH] drivers/rtc/interface.c: fix for fix of alarm initialization Ales Novak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140408164302.0f7c51b7@linux.lan.towertech.it \
--to=a.zummo@towertech.it \
--cc=akpm@linux-foundation.org \
--cc=alnovak@suse.cz \
--cc=jkosina@suse.cz \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox