X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fchar%2Frandom.c;fp=drivers%2Fchar%2Frandom.c;h=05c343fa9a90de0cac4f39a53cc8e8261775fc39;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=2726a4151ad8e87335b805a9184bdfa1c0899820;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/drivers/char/random.c b/drivers/char/random.c index 2726a4151..05c343fa9 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -224,6 +224,7 @@ */ #include +#include #include #include #include @@ -416,7 +417,7 @@ static struct entropy_store input_pool = { .poolinfo = &poolinfo_table[0], .name = "input", .limit = 1, - .lock = __SPIN_LOCK_UNLOCKED(&input_pool.lock), + .lock = SPIN_LOCK_UNLOCKED, .pool = input_pool_data }; @@ -425,7 +426,7 @@ static struct entropy_store blocking_pool = { .name = "blocking", .limit = 1, .pull = &input_pool, - .lock = __SPIN_LOCK_UNLOCKED(&blocking_pool.lock), + .lock = SPIN_LOCK_UNLOCKED, .pool = blocking_pool_data }; @@ -433,7 +434,7 @@ static struct entropy_store nonblocking_pool = { .poolinfo = &poolinfo_table[1], .name = "nonblocking", .pull = &input_pool, - .lock = __SPIN_LOCK_UNLOCKED(&nonblocking_pool.lock), + .lock = SPIN_LOCK_UNLOCKED, .pool = nonblocking_pool_data }; @@ -1583,6 +1584,7 @@ u32 secure_ipv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr, __u16 dpo return twothirdsMD4Transform(daddr, hash); } +EXPORT_SYMBOL(secure_ipv6_port_ephemeral); #endif #if defined(CONFIG_IP_DCCP) || defined(CONFIG_IP_DCCP_MODULE) @@ -1630,18 +1632,13 @@ EXPORT_SYMBOL(secure_dccp_sequence_number); */ unsigned int get_random_int(void) { - unsigned int val = 0; - -#ifdef CONFIG_X86_HAS_TSC - rdtscl(val); -#endif /* * Use IP's RNG. It suits our purpose perfectly: it re-keys itself * every second, from the entropy pool (and thus creates a limited * drain on it), and uses halfMD4Transform within the second. We * also mix it with jiffies and the PID: */ - return secure_ip_id(current->pid + jiffies + (int)val); + return secure_ip_id(current->pid + jiffies); } /*