Project

General

Profile

Actions

Feature #3242

open

120: rcu_dereference invocation under rcu_read_lock

Added by Denis Efremov over 11 years ago. Updated over 8 years ago.

Status:
New
Priority:
Normal
Assignee:
Start date:
07/20/2012
Due date:
% Done:

0%

Estimated time:
Published in build:

Description

From documentation:
lockdep will complain if you access rcu_dereference() outside of an RCU read-side critical section. See lockdep.txt to learn what to do about this.

In addition, a separate kernel config parameter CONFIG_PROVE_RCU enables
checking of rcu_dereference() primitives:

rcu_dereference(p):
Check for RCU read-side critical section.
rcu_dereference_bh(p):
Check for RCU-bh read-side critical section.
rcu_dereference_sched(p):
Check for RCU-sched read-side critical section.
srcu_dereference(p, sp):
Check for SRCU read-side critical section.

I think that we should also check rcu_read_lock/rcu_read_unlock pair for the absence of rcu_dereference. Such behaviour is allowed on x86 but will lead to the errors on Alpha architecture. It is an example of improper use of rcu_lock technique.

Actions

Also available in: Atom PDF