lkml.org 
[lkml]   [2017]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RT 03/10] random: avoid preempt_disable()ed section
From
Date

Hi Steve,

I just build the patches, a build error found here:

drivers/char/random.c: In function ‘get_random_int’:
drivers/char/random.c:1816:7: error: assignment from incompatible
pointer type [-Werror=incompatible-pointer-types]
hash = &get_locked_var(hash_entropy_int_lock, get_random_int_hash);
^
drivers/char/random.c: In function ‘get_random_long’:
drivers/char/random.c:1838:7: error: assignment from incompatible
pointer type [-Werror=incompatible-pointer-types]
hash = &get_locked_var(hash_entropy_int_lock, get_random_int_hash);
^

> - hash = get_cpu_var(get_random_int_hash);
> + hash = &get_locked_var(hash_entropy_int_lock, get_random_int_hash);
^
Is this a extra '&' which need to remove?

>
> hash[0] += current->pid + jiffies + random_get_entropy();
> md5_transform(hash, random_int_secret);
> ret = hash[0];
> - put_cpu_var(get_random_int_hash);
> + put_locked_var(hash_entropy_int_lock, get_random_int_hash);
>
> return ret;
> }
> @@ -1833,12 +1835,12 @@ unsigned long get_random_long(void)
> if (arch_get_random_long(&ret))
> return ret;
>
> - hash = get_cpu_var(get_random_int_hash);
> + hash = &get_locked_var(hash_entropy_int_lock, get_random_int_hash);
^
Ditto

Regards
Alex

\
 
 \ /
  Last update: 2017-11-24 07:27    [W:0.063 / U:1.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site