]> git.karo-electronics.de Git - linux-beck.git/commit
random: always update the entropy pool under the spinlock
authorTheodore Ts'o <tytso@mit.edu>
Wed, 11 Jun 2014 02:46:37 +0000 (22:46 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 15 Jul 2014 08:49:39 +0000 (04:49 -0400)
commit91fcb532efe366d79b93a3c8c368b9dca6176a55
tree3d2f571973e695ab5334abbaadbcad3a64152188
parent1795cd9b3a91d4b5473c97f491d63892442212ab
random: always update the entropy pool under the spinlock

Instead of using lockless techniques introduced in commit
902c098a3663, use spin_trylock to try to grab entropy pool's lock.  If
we can't get the lock, then just try again on the next interrupt.

Based on discussions with George Spelvin.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: George Spelvin <linux@horizon.com>
drivers/char/random.c