diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-02-15 16:24:37 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-15 16:24:37 -0500 |
commit | ca994a36f585432458ead9133fcfe05440edbb7b (patch) | |
tree | be05512153a9cd5cbe1f1234bc09fd9cd388ec58 /drivers/char/random.c | |
parent | 12325280dfeba18164f9c47e226a40ab34e23ee7 (diff) | |
parent | 2504a6423b9ab4c36df78227055995644de19edb (diff) | |
download | talos-op-linux-ca994a36f585432458ead9133fcfe05440edbb7b.tar.gz talos-op-linux-ca994a36f585432458ead9133fcfe05440edbb7b.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts:
net/mac80211/debugfs_sta.c
net/mac80211/sta_info.h
Diffstat (limited to 'drivers/char/random.c')
-rw-r--r-- | drivers/char/random.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c index 85da8740586b..54ca8b23cde3 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -387,7 +387,7 @@ static DECLARE_WAIT_QUEUE_HEAD(random_write_wait); static struct fasync_struct *fasync; #if 0 -static int debug; +static bool debug; module_param(debug, bool, 0644); #define DEBUG_ENT(fmt, arg...) do { \ if (debug) \ @@ -965,6 +965,7 @@ EXPORT_SYMBOL(get_random_bytes); */ static void init_std_data(struct entropy_store *r) { + int i; ktime_t now; unsigned long flags; @@ -974,6 +975,11 @@ static void init_std_data(struct entropy_store *r) now = ktime_get_real(); mix_pool_bytes(r, &now, sizeof(now)); + for (i = r->poolinfo->POOLBYTES; i > 0; i -= sizeof flags) { + if (!arch_get_random_long(&flags)) + break; + mix_pool_bytes(r, &flags, sizeof(flags)); + } mix_pool_bytes(r, utsname(), sizeof(*(utsname()))); } |