lkml.org 
[lkml]   [2006]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] RTC: Ensure that time being passed to set_alarm() is valid.
From
Date
RTC: Ensure that the time being passed to set_alarm() is valid.


Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>


diff -urN -x CVS linux-2.6.17-rc6/drivers/rtc/interface.c
linux-2.6.17-rc/drivers/rtc/interface.c
--- linux-2.6.17-rc6/drivers/rtc/interface.c Tue Jun 6 10:28:05 2006
+++ linux-2.6.17-rc/drivers/rtc/interface.c Wed Jun 7 11:46:28 2006
@@ -129,6 +129,10 @@
int err;
struct rtc_device *rtc = to_rtc_device(class_dev);

+ err = rtc_valid_tm(&alarm->time);
+ if (err != 0)
+ return err;
+
err = mutex_lock_interruptible(&rtc->ops_lock);
if (err)
return -EBUSY;


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-07 20:28    [W:0.320 / U:1.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site