Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / drivers / char / random.c
index caef35a..72a4fcb 100644 (file)
@@ -626,7 +626,7 @@ static void add_timer_randomness(struct timer_rand_state *state, unsigned num)
        preempt_disable();
        /* if over the trickle threshold, use only 1 in 4096 samples */
        if (input_pool.entropy_count > trickle_thresh &&
-           (__get_cpu_var(trickle_count)++ & 0xfff))
+           ((__this_cpu_inc_return(trickle_count) - 1) & 0xfff))
                goto out;
 
        sample.jiffies = jiffies;
@@ -1165,6 +1165,7 @@ const struct file_operations random_fops = {
        .poll  = random_poll,
        .unlocked_ioctl = random_ioctl,
        .fasync = random_fasync,
+       .llseek = noop_llseek,
 };
 
 const struct file_operations urandom_fops = {
@@ -1172,6 +1173,7 @@ const struct file_operations urandom_fops = {
        .write = random_write,
        .unlocked_ioctl = random_ioctl,
        .fasync = random_fasync,
+       .llseek = noop_llseek,
 };
 
 /***************************************************************