Feature #3242
open120: rcu_dereference invocation under rcu_read_lock
0%
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.
Updated by Denis Efremov over 12 years ago
- Subject changed from 120: rcu_dereference ouside rcu_read_lock/rcu_read_unlock pair to 120: rcu_dereference invocation under rcu_read_lock
Updated by Evgeny Novikov over 12 years ago
And what about Alexey's notices? He said that he already have implemented a corresponding model but this model has some lacks. I didn't see any dificulties in model implementation...
Updated by Anton Vasilyev almost 9 years ago
Require to add call of macros rcu_dereference_raw() to model for identification errors like in commit a214c05
Either one to create new rule for list operations.