Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 26 Jan 2015 01:47:34 +0000 (17:47 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 26 Jan 2015 01:47:34 +0000 (17:47 -0800)
Pull timer fixes from Thomas Gleixner:
 "A set of small fixes:

   - regression fix for exynos_mct clocksource

   - trivial build fix for kona clocksource

   - functional one liner fix for the sh_tmu clocksource

   - two validation fixes to prevent (root only) data corruption in the
     kernel via settimeofday and adjtimex.  Tagged for stable"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  time: adjtimex: Validate the ADJ_FREQUENCY values
  time: settimeofday: Validate the values of tv from user
  clocksource: sh_tmu: Set cpu_possible_mask to fix SMP broadcast
  clocksource: kona: fix __iomem annotation
  clocksource: exynos_mct: Fix bitmask regression for exynos4_mct_write

1  2 
kernel/time/time.c

diff --combined kernel/time/time.c
@@@ -196,6 -196,10 +196,10 @@@ SYSCALL_DEFINE2(settimeofday, struct ti
        if (tv) {
                if (copy_from_user(&user_tv, tv, sizeof(*tv)))
                        return -EFAULT;
+               if (!timeval_valid(&user_tv))
+                       return -EINVAL;
                new_ts.tv_sec = user_tv.tv_sec;
                new_ts.tv_nsec = user_tv.tv_usec * NSEC_PER_USEC;
        }
@@@ -741,7 -745,6 +745,7 @@@ u64 nsecs_to_jiffies64(u64 n
        return div_u64(n * 9, (9ull * NSEC_PER_SEC + HZ / 2) / HZ);
  #endif
  }
 +EXPORT_SYMBOL(nsecs_to_jiffies64);
  
  /**
   * nsecs_to_jiffies - Convert nsecs in u64 to jiffies