diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-14 11:30:23 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-14 11:30:23 +0200 |
commit | df39e8ba56a788733d369068c7319e04b1da3cd5 (patch) | |
tree | 1e9be853bdb455e341cdbf957656f342cfa2eb9e /lib | |
parent | [SKB]: __skb_queue_tail = __skb_insert before (diff) | |
parent | [BRIDGE]: Fix crash in __ip_route_output_key with bridge netfilter (diff) | |
download | linux-df39e8ba56a788733d369068c7319e04b1da3cd5.tar.xz linux-df39e8ba56a788733d369068c7319e04b1da3cd5.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/ehea/ehea_main.c
drivers/net/wireless/iwlwifi/Kconfig
drivers/net/wireless/rt2x00/rt61pci.c
net/ipv4/inet_timewait_sock.c
net/ipv6/raw.c
net/mac80211/ieee80211_sta.c
Diffstat (limited to 'lib')
-rw-r--r-- | lib/random32.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/random32.c b/lib/random32.c index ec7f81d3fb18..ca87d86992bd 100644 --- a/lib/random32.c +++ b/lib/random32.c @@ -97,13 +97,18 @@ EXPORT_SYMBOL(random32); * @seed: seed value * * Add some additional seeding to the random32() pool. - * Note: this pool is per cpu so it only affects current CPU. */ void srandom32(u32 entropy) { - struct rnd_state *state = &get_cpu_var(net_rand_state); - __set_random32(state, state->s1 ^ entropy); - put_cpu_var(state); + int i; + /* + * No locking on the CPUs, but then somewhat random results are, well, + * expected. + */ + for_each_possible_cpu (i) { + struct rnd_state *state = &per_cpu(net_rand_state, i); + __set_random32(state, state->s1 ^ entropy); + } } EXPORT_SYMBOL(srandom32); |