[ Edit:
Covers the per-cpu call_rcu data setup (not all_cpus helper, which is
why we did not trigger it in our tests. ]
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
static int warned = 0;
call_rcu_lock(&call_rcu_mutex);
+ alloc_cpu_call_rcu_data();
if (cpu < 0 || maxcpus <= cpu) {
if (!warned) {
fprintf(stderr, "[error] liburcu: set CPU # out of range\n");
errno = EINVAL;
return -EINVAL;
}
- alloc_cpu_call_rcu_data();
call_rcu_unlock(&call_rcu_mutex);
if (per_cpu_call_rcu_data == NULL) {
errno = ENOMEM;