]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
firewire: core: feed /dev/random with devices' GUIDs
authorClemens Ladisch <clemens@ladisch.de>
Mon, 13 Aug 2012 07:08:41 +0000 (09:08 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Tue, 25 Sep 2012 14:18:17 +0000 (16:18 +0200)
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>
drivers/firewire/core-device.c

index 7a05fd24d68b9c126719ac320620dee9343f49a4..3873d535b28d5a5a930566333cbd587c2196d7f1 100644 (file)
@@ -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);
        }
 
        /*