[kernel] r18430 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series
Ben Hutchings
benh at alioth.debian.org
Thu Dec 29 15:34:54 UTC 2011
Author: benh
Date: Thu Dec 29 15:34:52 2011
New Revision: 18430
Log:
rtc: Fix alarm rollover when day or month is out-of-range (Closes: #646429)
Added:
dists/sid/linux-2.6/debian/patches/bugfix/all/rtc-Fix-alarm-rollover-when-day-or-month-is-out-of-r.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/base
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Wed Dec 28 21:42:53 2011 (r18429)
+++ dists/sid/linux-2.6/debian/changelog Thu Dec 29 15:34:52 2011 (r18430)
@@ -8,6 +8,7 @@
* net: Fix regressions that may result in a crash when using br_netfilter:
- bridge: provide a mtu() method for fake_dst_ops
- net: introduce DST_NOPEER dst flag
+ * rtc: Fix alarm rollover when day or month is out-of-range (Closes: #646429)
[ Jonathan Nieder ]
* prerm: Print an error message when aborting removal of the running
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/rtc-Fix-alarm-rollover-when-day-or-month-is-out-of-r.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/rtc-Fix-alarm-rollover-when-day-or-month-is-out-of-r.patch Thu Dec 29 15:34:52 2011 (r18430)
@@ -0,0 +1,39 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Thu, 29 Dec 2011 14:38:52 +0100
+Subject: [PATCH] rtc: Fix alarm rollover when day or month is out-of-range
+
+Commit f44f7f96a20af16f6f12e1c995576d6becf5f57b ('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.
+
+References: http://bugs.debian.org/646429
+References: http://bugs.debian.org/653331
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+ drivers/rtc/interface.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
+index 3d9d2b9..f79ff34 100644
+--- a/drivers/rtc/interface.c
++++ b/drivers/rtc/interface.c
+@@ -227,11 +227,11 @@ int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
+ 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;
+--
+1.7.7.3
+
Modified: dists/sid/linux-2.6/debian/patches/series/base
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/base Wed Dec 28 21:42:53 2011 (r18429)
+++ dists/sid/linux-2.6/debian/patches/series/base Thu Dec 29 15:34:52 2011 (r18430)
@@ -91,3 +91,4 @@
+ bugfix/all/drm-radeon-flush-read-cache-for-gtt-with-fence-on-r6.patch
+ bugfix/all/bridge-provide-a-mtu-method-for-fake_dst_ops.patch
+ bugfix/all/net-introduce-DST_NOPEER-dst-flag.patch
++ bugfix/all/rtc-Fix-alarm-rollover-when-day-or-month-is-out-of-r.patch
More information about the Kernel-svn-changes
mailing list