Project

General

Profile

Actions

Feature #3245

open

127: value returned by rcu_dereference() is valid only within the enclosing RCU read-side critical section

Added by Denis Efremov over 12 years ago. Updated over 12 years ago.

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

0%

Estimated time:
Published in build:

Description

From documentation:
Note that the value returned by rcu_dereference() is valid
only within the enclosing RCU read-side critical section.
For example, the following is not legal:

rcu_read_lock();
p = rcu_dereference(head.next);
rcu_read_unlock();
x = p->address;
rcu_read_lock();
y = p->data;
rcu_read_unlock();

Holding a reference from one RCU read-side critical section
to another is just as illegal as holding a reference from
one lock-based critical section to another! Similarly,
using a reference outside of the critical section in which
it was acquired is just as illegal as doing so with normal
locking.

Actions #1

Updated by Denis Efremov over 12 years ago

  • Description updated (diff)
Actions #2

Updated by Evgeny Novikov over 12 years ago

I guess, that this may be a good rule for pointer analysis. But we should think how to formalize this rule with help of CIF.

Actions

Also available in: Atom PDF