Skip to content

Commit

Permalink
firewire: core: feed /dev/random with devices' GUIDs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Clemens Ladisch authored and Stefan Richter committed Sep 25, 2012
1 parent 979570e commit badfcb2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/firewire/core-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit badfcb2

Please sign in to comment.