[ltt-dev] [PATCH 07/10] protect writing to per_cpu_call_rcu_data[*]

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Thu Sep 15 11:17:20 EDT 2011


* Lai Jiangshan (laijs at cn.fujitsu.com) wrote:
> Signed-off-by: Lai Jiangshan <laijs at cn.fujitsu.com>

Merged, thanks!

Mathieu

> ---
>  urcu-call-rcu-impl.h |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/urcu-call-rcu-impl.h b/urcu-call-rcu-impl.h
> index 6e80fa9..c822646 100644
> --- a/urcu-call-rcu-impl.h
> +++ b/urcu-call-rcu-impl.h
> @@ -396,12 +396,13 @@ int set_cpu_call_rcu_data(int cpu, struct call_rcu_data *crdp)
>  		errno = EINVAL;
>  		return -EINVAL;
>  	}
> -	call_rcu_unlock(&call_rcu_mutex);
>  	if (per_cpu_call_rcu_data == NULL) {
> +		call_rcu_unlock(&call_rcu_mutex);
>  		errno = ENOMEM;
>  		return -ENOMEM;
>  	}
>  	per_cpu_call_rcu_data[cpu] = crdp;
> +	call_rcu_unlock(&call_rcu_mutex);
>  	return 0;
>  }
>  
> -- 
> 1.7.4.4
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




More information about the lttng-dev mailing list