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

Also available in: Atom PDF