提交 8210fd2a 编写于 作者: J Jeff Dike 提交者: Linus Torvalds

[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: NJeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 e46962fd
......@@ -98,4 +98,4 @@ static int register_daemon(void)
return 0;
}
__initcall(register_daemon);
late_initcall(register_daemon);
......@@ -127,4 +127,4 @@ static int register_mcast(void)
return 0;
}
__initcall(register_mcast);
late_initcall(register_mcast);
......@@ -109,4 +109,4 @@ static int register_pcap(void)
return 0;
}
__initcall(register_pcap);
late_initcall(register_pcap);
......@@ -95,4 +95,4 @@ static int register_slip(void)
return 0;
}
__initcall(register_slip);
late_initcall(register_slip);
......@@ -119,4 +119,4 @@ static int register_slirp(void)
return 0;
}
__initcall(register_slirp);
late_initcall(register_slirp);
......@@ -105,4 +105,4 @@ static int register_ethertap(void)
return 0;
}
__initcall(register_ethertap);
late_initcall(register_ethertap);
......@@ -90,4 +90,4 @@ static int register_tuntap(void)
return 0;
}
__initcall(register_tuntap);
late_initcall(register_tuntap);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册