[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56154A84.5020206@plumgrid.com>
Date: Wed, 7 Oct 2015 09:38:28 -0700
From: Alexei Starovoitov <ast@...mgrid.com>
To: Daniel Borkmann <daniel@...earbox.net>, davem@...emloft.net
Cc: hannes@...essinduktion.org, netdev@...r.kernel.org,
Chema Gonzalez <chema@...gle.com>
Subject: Re: [PATCH net-next 5/5] bpf: split state from prandom_u32() and
consolidate {c,e}BPF prngs
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 <ast@...mgrid.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists