Subject: Re: [PATCH net-next 5/5] bpf: split state from prandom_u32() and consolidate {c,e}BPF prngs

From: Alexei Starovoitov <[email-masked]>
Date: Wed, 7 Oct 2015 09:38:28 -0700

On 10/7/15 6:43 AM, Daniel Borkmann wrote:
> +void bpf_user_rnd_init_once(void)
> +{
> +	prandom_init_once(&bpf_user_rnd_state);
> +}

here the helper is definitely needed, since it's called from two
places and we must make sure that prandom_init_once doesn't
duplicate its static_key in two places.
Probably makes sense to add a comment to do_once api that

do_once(func, arg);
do_once(func, arg);

is not equal to

void my_helper(void) { do_once(func, arg); }
my_helper();
my_helper();

For this patch:
Acked-by: Alexei Starovoitov <[email-masked]>