|
@@ -407,7 +407,7 @@ struct entropy_store {
|
|
/* read-write data: */
|
|
/* read-write data: */
|
|
spinlock_t lock;
|
|
spinlock_t lock;
|
|
unsigned add_ptr;
|
|
unsigned add_ptr;
|
|
- int entropy_count; /* Must at no time exceed ->POOLBITS! */
|
|
|
|
|
|
+ int entropy_count;
|
|
int input_rotate;
|
|
int input_rotate;
|
|
};
|
|
};
|
|
|
|
|
|
@@ -767,11 +767,10 @@ static size_t account(struct entropy_store *r, size_t nbytes, int min,
|
|
{
|
|
{
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
|
|
|
|
- BUG_ON(r->entropy_count > r->poolinfo->POOLBITS);
|
|
|
|
-
|
|
|
|
/* Hold lock while accounting */
|
|
/* Hold lock while accounting */
|
|
spin_lock_irqsave(&r->lock, flags);
|
|
spin_lock_irqsave(&r->lock, flags);
|
|
|
|
|
|
|
|
+ BUG_ON(r->entropy_count > r->poolinfo->POOLBITS);
|
|
DEBUG_ENT("trying to extract %d bits from %s\n",
|
|
DEBUG_ENT("trying to extract %d bits from %s\n",
|
|
nbytes * 8, r->name);
|
|
nbytes * 8, r->name);
|
|
|
|
|