diff options
author | Davidlohr Bueso <dave@stgolabs.net> | 2016-01-21 00:00:42 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-21 02:09:18 +0100 |
commit | a460bece027301e079b9e53c5e0f67c8e3eaebc1 (patch) | |
tree | c53d99607bbbb604bb48cc44d889459d354acd7f /kernel/sysctl.c | |
parent | rapidio: use kobj_to_dev() (diff) | |
download | linux-a460bece027301e079b9e53c5e0f67c8e3eaebc1.tar.xz linux-a460bece027301e079b9e53c5e0f67c8e3eaebc1.zip |
rbtree: use READ_ONCE in RB_EMPTY_ROOT
With commit d72da4a4d97 ("rbtree: Make lockless searches non-fatal") our
rbtrees provide weak guarantees that allows us to do lockless (and very
speculative) reads of the tree. Such readers cannot see partial stores
on nodes, ie left/right as well as root. As such, similar to the
WRITE_ONCE semantics when doing rotations, use READ_ONCE when checking
the root node in RB_EMPTY_ROOT.
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Michel Lespinasse <walken@google.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sysctl.c')
0 files changed, 0 insertions, 0 deletions