mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Victor <andrew@sanpeople.com>
To: linux-kernel@vger.kernel.org
Cc: alessandro.zummo@towertech.it, akpm@osdl.org
Subject: [PATCH] RTC: Ensure that time being passed to set_alarm() is valid.
Date: 07 Jun 2006 20:20:55 +0200	[thread overview]
Message-ID: <1149704455.20386.90.camel@fuzzie.sanpeople.com> (raw)

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;




             reply	other threads:[~2006-06-07 18:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-07 18:20 Andrew Victor [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1149704455.20386.90.camel@fuzzie.sanpeople.com \
    --to=andrew@sanpeople.com \
    --cc=akpm@osdl.org \
    --cc=alessandro.zummo@towertech.it \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®