* [merged] drivers-rtc-interfacec-fix-alarm-rollover-when-day-or-month-is-out-of-range.patch removed from -mm tree
@ 2012-01-11 21:32 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2012-01-11 21:32 UTC (permalink / raw)
To: ben, a.zummo, broonie, john.stultz, jrnieder, leoweppelman,
mailme667, mroberto, stable, tglx, mm-commits
The patch titled
Subject: drivers/rtc/interface.c: fix alarm rollover when day or month is out-of-range
has been removed from the -mm tree. Its filename was
drivers-rtc-interfacec-fix-alarm-rollover-when-day-or-month-is-out-of-range.patch
This patch was dropped because it was merged into mainline or a subsystem tree
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: Ben Hutchings <ben@decadent.org.uk>
Subject: drivers/rtc/interface.c: fix alarm rollover when day or month is out-of-range
Commit f44f7f96a20a ("RTC: Initialize kernel state from RTC") introduced a
potential infinite loop. If an alarm time contains a wildcard month and
an invalid day (> 31), or a wildcard year and an invalid month (>= 12),
the loop searching for the next matching date will never terminate. Treat
the invalid values as wildcards.
Fixes <http://bugs.debian.org/646429>, <http://bugs.debian.org/653331>
Reported-by: leo weppelman <leoweppelman@googlemail.com>
Reported-by: "P. van Gaans" <mailme667@yahoo.co.uk>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/rtc/interface.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -puN drivers/rtc/interface.c~drivers-rtc-interfacec-fix-alarm-rollover-when-day-or-month-is-out-of-range drivers/rtc/interface.c
--- a/drivers/rtc/interface.c~drivers-rtc-interfacec-fix-alarm-rollover-when-day-or-month-is-out-of-range
+++ a/drivers/rtc/interface.c
@@ -228,11 +228,11 @@ int __rtc_read_alarm(struct rtc_device *
alarm->time.tm_hour = now.tm_hour;
/* For simplicity, only support date rollover for now */
- if (alarm->time.tm_mday == -1) {
+ if (alarm->time.tm_mday < 1 || alarm->time.tm_mday > 31) {
alarm->time.tm_mday = now.tm_mday;
missing = day;
}
- if (alarm->time.tm_mon == -1) {
+ if ((unsigned)alarm->time.tm_mon >= 12) {
alarm->time.tm_mon = now.tm_mon;
if (missing == none)
missing = month;
_
Patches currently in -mm which might be from ben@decadent.org.uk are
origin.patch
linux-next.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-01-11 21:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-11 21:32 [merged] drivers-rtc-interfacec-fix-alarm-rollover-when-day-or-month-is-out-of-range.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.