rcu: allow nesting of rcu_read_lock/rcu_read_unlock

Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2015-01-13 17:34:15 +01:00
parent 8fda74a52b
commit d62cb4f2fd
2 changed files with 16 additions and 1 deletions

View file

@ -255,9 +255,11 @@ static void *rcu_read_stress_test(void *arg)
if (p->mbtest == 0) {
n_mberror++;
}
rcu_read_lock();
for (i = 0; i < 100; i++) {
garbage++;
}
rcu_read_unlock();
pc = p->pipe_count;
rcu_read_unlock();
if ((pc > RCU_STRESS_PIPE_LEN) || (pc < 0)) {