lkml.org 
[lkml]   [2011]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 3/3] rtc: Limit frequency
The RTC hrtimer is self rearming. We really need to limit the
frequency to something sensible.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
---
drivers/rtc/interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/rtc/interface.c
===================================================================
--- linux-2.6.orig/drivers/rtc/interface.c
+++ linux-2.6/drivers/rtc/interface.c
@@ -708,7 +708,7 @@ int rtc_irq_set_freq(struct rtc_device *
int err = 0;
unsigned long flags;

- if (freq <= 0)
+ if (freq <= 0 || freq > 5000)
return -EINVAL;
retry:
spin_lock_irqsave(&rtc->irq_task_lock, flags);



\
 
 \ /
  Last update: 2011-07-22 11:15    [W:3.226 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site