summaryrefslogtreecommitdiff
path: root/drivers/firewire/core-device.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2012-08-13 11:08:41 +0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2012-09-25 18:18:17 +0400
commitbadfcb24891ccd6d37750864b97586af8ab052c3 (patch)
treeaa48313cfb470d4555098075924813e0d5dc404c /drivers/firewire/core-device.c
parent979570e02981d4a8fc20b3cc8fd651856c98ee9d (diff)
downloadlinux-badfcb24891ccd6d37750864b97586af8ab052c3.tar.xz
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: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/core-device.c')
-rw-r--r--drivers/firewire/core-device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
index 7a05fd24d68b..3873d535b28d 100644
--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -32,6 +32,7 @@
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/mutex.h>
+#include <linux/random.h>
#include <linux/rwsem.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
@@ -1066,6 +1067,8 @@ static void fw_device_init(struct work_struct *work)
device->config_rom_retries = 0;
set_broadcast_channel(device, device->generation);
+
+ add_device_randomness(&device->config_rom[3], 8);
}
/*