Linus,

Please pull the latest timers-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 
timers-urgent-for-linus

   HEAD: 00f4e13c4634b10f6a16b26a980b22a53dfa6bb5 clocksource : Nomadik-mtu : 
fix missing irq initialization

 Thanks,

        Ingo

------------------>
Daniel Lezcano (1):
      clocksource : Nomadik-mtu : fix missing irq initialization

Tejun Heo (1):
      posix-timer: Don't call idr_find() with out-of-range ID


 drivers/clocksource/nomadik-mtu.c | 1 +
 kernel/posix-timers.c             | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/clocksource/nomadik-mtu.c 
b/drivers/clocksource/nomadik-mtu.c
index 8914c3c..7cbcaa0 100644
--- a/drivers/clocksource/nomadik-mtu.c
+++ b/drivers/clocksource/nomadik-mtu.c
@@ -226,5 +226,6 @@ void __init nmdk_timer_init(void __iomem *base, int irq)
        /* Timer 1 is used for events, register irq and clockevents */
        setup_irq(irq, &nmdk_timer_irq);
        nmdk_clkevt.cpumask = cpumask_of(0);
+       nmdk_clkevt.irq = irq;
        clockevents_config_and_register(&nmdk_clkevt, rate, 2, 0xffffffffU);
 }
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index 10349d5..7edfe4b 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -639,6 +639,13 @@ static struct k_itimer *__lock_timer(timer_t timer_id, 
unsigned long *flags)
 {
        struct k_itimer *timr;
 
+       /*
+        * timer_t could be any type >= int and we want to make sure any
+        * @timer_id outside positive int range fails lookup.
+        */
+       if ((unsigned long long)timer_id > INT_MAX)
+               return NULL;
+
        rcu_read_lock();
        timr = idr_find(&posix_timers_id, (int)timer_id);
        if (timr) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to