]> git.baikalelectronics.ru Git - kernel.git/commit
list: Use WRITE_ONCE() when adding to lists and hlists
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 21 Sep 2015 05:02:17 +0000 (22:02 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 23 Nov 2015 18:37:35 +0000 (10:37 -0800)
commit8b1cce0c5651d1190785629037e57f957eef0814
tree805643267b5d6cc61c8dd168c4610c554cd76a68
parent8319f8e78d658631e5b4665fbf680d01bc5a2be3
list: Use WRITE_ONCE() when adding to lists and hlists

Code that does lockless emptiness testing of non-RCU lists is relying
on the list-addition code to write the list head's ->next pointer
atomically.  This commit therefore adds WRITE_ONCE() to list-addition
pointer stores that could affect the head's ->next pointer.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
include/linux/list.h
lib/list_debug.c