git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
net
/
core
/
utils.c
diff --git
a/net/core/utils.c
b/net/core/utils.c
index
e31c90e
..
fdc4f38
100644
(file)
--- a/
net/core/utils.c
+++ b/
net/core/utils.c
@@
-121,7
+121,7
@@
void __init net_random_init(void)
{
int i;
{
int i;
- for_each_
possible_
cpu(i) {
+ for_each_cpu(i) {
struct nrnd_state *state = &per_cpu(net_rand_state,i);
__net_srandom(state, i+jiffies);
}
struct nrnd_state *state = &per_cpu(net_rand_state,i);
__net_srandom(state, i+jiffies);
}
@@
-130,13
+130,12
@@
void __init net_random_init(void)
static int net_random_reseed(void)
{
int i;
static int net_random_reseed(void)
{
int i;
- unsigned long seed;
+ unsigned long seed
[NR_CPUS]
;
- for_each_possible_cpu(i) {
+ get_random_bytes(seed, sizeof(seed));
+ for_each_cpu(i) {
struct nrnd_state *state = &per_cpu(net_rand_state,i);
struct nrnd_state *state = &per_cpu(net_rand_state,i);
-
- get_random_bytes(&seed, sizeof(seed));
- __net_srandom(state, seed);
+ __net_srandom(state, seed[i]);
}
return 0;
}
}
return 0;
}