nbits, r->name);
}
+ /* should we wake readers? */
+ if (r == &input_pool && r->entropy_count >= random_read_wakeup_thresh)
+ wake_up_interruptible(&random_read_wait);
+
spin_unlock_irqrestore(&r->lock, flags);
}
credit_entropy_store(&input_pool,
min_t(int, fls(delta>>1), 11));
}
-
- if (input_pool.entropy_count >= random_read_wakeup_thresh)
- wake_up_interruptible(&random_read_wait);
-
out:
preempt_enable();
}
if (get_user(ent_count, p))
return -EFAULT;
credit_entropy_store(&input_pool, ent_count);
- /*
- * Wake up waiting processes if we have enough
- * entropy.
- */
- if (input_pool.entropy_count >= random_read_wakeup_thresh)
- wake_up_interruptible(&random_read_wait);
return 0;
case RNDADDENTROPY:
if (!capable(CAP_SYS_ADMIN))
if (retval < 0)
return retval;
credit_entropy_store(&input_pool, ent_count);
- /*
- * Wake up waiting processes if we have enough
- * entropy.
- */
- if (input_pool.entropy_count >= random_read_wakeup_thresh)
- wake_up_interruptible(&random_read_wait);
return 0;
case RNDZAPENTCNT:
case RNDCLEARPOOL: