Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 24 Mar 2020 15:36:27 +0000
From: Will Deacon <>
Cc: Will Deacon <>,
	Eric Dumazet <>,
	Jann Horn <>,
	Kees Cook <>,
	Maddie Stone <>,
	Marco Elver <>,
	"Paul E . McKenney" <>,
	Peter Zijlstra <>,
	Thomas Gleixner <>,,
Subject: [RFC PATCH 05/21] list: Comment missing WRITE_ONCE() in __list_del()

Although __list_del() is called from the RCU list implementation, it
omits WRITE_ONCE() when updating the 'prev' pointer for the 'next' node.
This is reasonable because concurrent RCU readers only access the 'next'

Although it's obvious after reading the code, add a comment.

Cc: Paul E. McKenney <>
Cc: Peter Zijlstra <>
Signed-off-by: Will Deacon <>
 include/linux/list.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/list.h b/include/linux/list.h
index 4d9f5f9ed1a8..ec1f780d1449 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -109,6 +109,7 @@ static inline void list_add_tail(struct list_head *new, struct list_head *head)
 static inline void __list_del(struct list_head * prev, struct list_head * next)
+	/* RCU readers don't read the 'prev' pointer */
 	next->prev = prev;
 	WRITE_ONCE(prev->next, next);

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.