The patch titled rtc: rtc-isl1208: reject invalid dates has been removed from the -mm tree. Its filename was rtc-rtc-isl1208-reject-invalid-dates.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/ ------------------------------------------------------ Subject: rtc: rtc-isl1208: reject invalid dates From: Chris Elston <celston@xxxxxxxxxxx> This patch for the rtc-isl1208 driver makes it reject invalid dates. Signed-off-by: Chris Elston <celston@xxxxxxxxxxx> [a.zummo@xxxxxxxxxxxx: added comment explaining the check] Signed-off-by: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Cc: Hebert Valerio Riedel <hvr@xxxxxxx> Cc: David Brownell <david-b@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/rtc-isl1208.c | 7 +++++++ 1 file changed, 7 insertions(+) diff -puN drivers/rtc/rtc-isl1208.c~rtc-rtc-isl1208-reject-invalid-dates drivers/rtc/rtc-isl1208.c --- a/drivers/rtc/rtc-isl1208.c~rtc-rtc-isl1208-reject-invalid-dates +++ a/drivers/rtc/rtc-isl1208.c @@ -328,6 +328,13 @@ isl1208_i2c_set_time(struct i2c_client * int sr; u8 regs[ISL1208_RTC_SECTION_LEN] = { 0, }; + /* The clock has an 8 bit wide bcd-coded register (they never learn) + * for the year. tm_year is an offset from 1900 and we are interested + * in the 2000-2099 range, so any value less than 100 is invalid. + */ + if (tm->tm_year < 100) + return -EINVAL; + regs[ISL1208_REG_SC] = bin2bcd(tm->tm_sec); regs[ISL1208_REG_MN] = bin2bcd(tm->tm_min); regs[ISL1208_REG_HR] = bin2bcd(tm->tm_hour) | ISL1208_REG_HR_MIL; _ Patches currently in -mm which might be from celston@xxxxxxxxxxx are -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html