Ben Hutchings e74a8f2edb 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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-10 16:30:53 -08:00
..
2012-01-09 14:38:51 -08:00
2012-01-03 22:54:07 -05:00
2012-01-09 14:44:15 -08:00
2012-01-09 14:39:22 -08:00
2012-01-09 14:39:22 -08:00
2012-01-09 14:39:22 -08:00
2012-01-08 13:28:33 -08:00
2012-01-09 14:39:22 -08:00
2012-01-09 14:44:15 -08:00
2012-01-09 14:44:15 -08:00
2012-01-09 14:30:28 -08:00
2012-01-09 14:39:22 -08:00