提交 badfcb24 编写于 作者: C Clemens Ladisch 提交者: Stefan Richter

firewire: core: feed /dev/random with devices' GUIDs

Send the GUIDs of newly registered controllers and devices
to the /dev/random driver to help seed its pools.
Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
上级 979570e0
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <linux/mod_devicetable.h> #include <linux/mod_devicetable.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/random.h>
#include <linux/rwsem.h> #include <linux/rwsem.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
...@@ -1066,6 +1067,8 @@ static void fw_device_init(struct work_struct *work) ...@@ -1066,6 +1067,8 @@ static void fw_device_init(struct work_struct *work)
device->config_rom_retries = 0; device->config_rom_retries = 0;
set_broadcast_channel(device, device->generation); set_broadcast_channel(device, device->generation);
add_device_randomness(&device->config_rom[3], 8);
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册