Re: [PATCH] rcu: call __rcu_read_unlock() in exit_rcu()

From: Paul E. McKenney
Date: Mon Jan 10 2011 - 00:01:04 EST


On Tue, Jan 04, 2011 at 04:32:25PM +0800, Lai Jiangshan wrote:
>
> rcu_read_unlock() is a wrapper of many things:
> the core __rcu_read_unlock(), debugs...etc.
>
> It is better that we only calls the core __rcu_read_unlock() here.

Hello, Lai!

Last time I checked, a task exiting in an RCU read-side critical section
got an error before it got to this point. That said, the "__" does a
good job of indicating that this is not a normal end of an RCU read-side
critical section.

I have queued this at least for the moment, and also created a TINY_RCU
counterpart.

Thanx, Paul

> signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>
> ---
> diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
> index a363871..94035a0 100644
> --- a/kernel/rcutree_plugin.h
> +++ b/kernel/rcutree_plugin.h
> @@ -802,7 +802,7 @@ void exit_rcu(void)
> if (t->rcu_read_lock_nesting == 0)
> return;
> t->rcu_read_lock_nesting = 1;
> - rcu_read_unlock();
> + __rcu_read_unlock();
> }
>
> #else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/