public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RTC: Ensure that time being passed to set_alarm() is valid.
@ 2006-06-07 18:20 Andrew Victor
  2006-06-07 18:39 ` Andrew Morton
  2006-06-07 19:31 ` Russell King
  0 siblings, 2 replies; 5+ messages in thread
From: Andrew Victor @ 2006-06-07 18:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: alessandro.zummo, akpm

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;




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-06-08  6:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-07 18:20 [PATCH] RTC: Ensure that time being passed to set_alarm() is valid Andrew Victor
2006-06-07 18:39 ` Andrew Morton
2006-06-07 18:50   ` Alessandro Zummo
2006-06-07 19:31 ` Russell King
2006-06-08  6:23   ` Andrew Victor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox