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 17:27:14 +0100
From: Greg KH <>
To: Will Deacon <>
Cc:, Eric Dumazet <>,
	Jann Horn <>, Kees Cook <>,
	Maddie Stone <>,
	Marco Elver <>,
	"Paul E . McKenney" <>,
	Peter Zijlstra <>,
	Thomas Gleixner <>,,
Subject: Re: [RFC PATCH 01/21] list: Remove hlist_unhashed_lockless()

On Tue, Mar 24, 2020 at 03:36:23PM +0000, Will Deacon wrote:
> Commit c54a2744497d ("list: Add hlist_unhashed_lockless()") added a
> "lockless" variant of hlist_unhashed() that uses READ_ONCE() to access
> the 'pprev' pointer of the 'hlist_node', the intention being that this
> could be used by 'timer_pending()' to silence a KCSAN warning. As well
> as forgetting to add the caller, the patch also sprinkles
> {READ,WRITE}_ONCE() invocations over the standard (i.e. non-RCU) hlist
> code, which is undesirable for a number of reasons:
>   1. It gives the misleading impression that the non-RCU hlist code is
>      in some way lock-free (despite the notable absence of any memory
>      barriers!) and silences KCSAN in such cases.
>   2. It unnecessarily penalises code generation for non-RCU hlist users
>   3. It makes it difficult to introduce list integrity checks because
>      of the possibility of concurrent callers.
> Retain the {READ,WRITE}_ONCE() invocations for the RCU hlist code, but
> remove them from the non-RCU implementation. Remove the unused
> 'hlist_unhashed_lockless()' function entirely and add the READ_ONCE()
> to hlist_unhashed(), as we do already for hlist_empty() already.
> Cc: Eric Dumazet <>
> Cc: Thomas Gleixner <>
> Cc: Paul E. McKenney <>
> Cc: Peter Zijlstra <>
> Signed-off-by: Will Deacon <>
> ---
>  include/linux/list.h | 33 ++++++++++-----------------------
>  1 file changed, 10 insertions(+), 23 deletions(-)

Reviewed-by: Greg Kroah-Hartman <>

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.