Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268963
b: refs/heads/master
c: e5177ec
h: refs/heads/master
i:
  268961: 91f46a3
  268959: eff6dab
v: v3
  • Loading branch information
Michal Hocko authored and Paul E. McKenney committed Sep 29, 2011
1 parent d0c478a commit 3abd9d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4cc1f22b2f4e9b0207a8cdb63e56dcf99e82d35
refs/heads/master: e5177ec77d503636d0b609671c9d408b981add17
10 changes: 4 additions & 6 deletions trunk/Documentation/RCU/lockdep.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,19 @@ checking of rcu_dereference() primitives:
value of the pointer itself, for example, against NULL.

The rcu_dereference_check() check expression can be any boolean
expression, but would normally include one of the rcu_read_lock_held()
family of functions and a lockdep expression. However, any boolean
expression can be used. For a moderately ornate example, consider
the following:
expression, but would normally include a lockdep expression. However,
any boolean expression can be used. For a moderately ornate example,
consider the following:

file = rcu_dereference_check(fdt->fd[fd],
rcu_read_lock_held() ||
lockdep_is_held(&files->file_lock) ||
atomic_read(&files->count) == 1);

This expression picks up the pointer "fdt->fd[fd]" in an RCU-safe manner,
and, if CONFIG_PROVE_RCU is configured, verifies that this expression
is used in:

1. An RCU read-side critical section, or
1. An RCU read-side critical section (implicit), or
2. with files->file_lock held, or
3. on an unshared files_struct.

Expand Down

0 comments on commit 3abd9d2

Please sign in to comment.