Project

General

Profile

Actions

Feature #3242

open

120: rcu_dereference invocation under rcu_read_lock

Added by Denis Efremov over 12 years ago. Updated about 9 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 #1

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
Actions #2

Updated by Denis Efremov over 12 years ago

  • Description updated (diff)
Actions #3

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...

Actions #4

Updated by Anton Vasilyev about 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.

Actions

Also available in: Atom PDF