aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/drivers
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-12-06 23:34:55 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:29 -0500
commit8210fd2a9fe4b36e99ab777a1a81eb47b703c235 (patch)
treee39b0dd28492a6255928557504284fe6e99eead6 /arch/um/os-Linux/drivers
parente46962fdd28f8b30b465e507b657627aa4c1a409 (diff)
[PATCH] uml: use get_random_bytes() after random pool is seeded
When the UML network driver generates random MACs for its devices, it was possible for a number of UMLs to get the same MACs because the ethernet initialization was done before the random pool was properly seeded. This patch moves the initialization later so that it gets better randomness. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/os-Linux/drivers')
-rw-r--r--arch/um/os-Linux/drivers/ethertap_kern.c2
-rw-r--r--arch/um/os-Linux/drivers/tuntap_kern.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/os-Linux/drivers/ethertap_kern.c b/arch/um/os-Linux/drivers/ethertap_kern.c
index 16385e2ada85..70541821775f 100644
--- a/arch/um/os-Linux/drivers/ethertap_kern.c
+++ b/arch/um/os-Linux/drivers/ethertap_kern.c
@@ -105,4 +105,4 @@ static int register_ethertap(void)
105 return 0; 105 return 0;
106} 106}
107 107
108__initcall(register_ethertap); 108late_initcall(register_ethertap);
diff --git a/arch/um/os-Linux/drivers/tuntap_kern.c b/arch/um/os-Linux/drivers/tuntap_kern.c
index 0edbac63c527..76570a2c25c3 100644
--- a/arch/um/os-Linux/drivers/tuntap_kern.c
+++ b/arch/um/os-Linux/drivers/tuntap_kern.c
@@ -90,4 +90,4 @@ static int register_tuntap(void)
90 return 0; 90 return 0;
91} 91}
92 92
93__initcall(register_tuntap); 93late_initcall(register_tuntap);