lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <4E6A0BCB-02F4-4AB9-BE56-7FC7C15A6B2C@gmail.com>
Date:   Mon, 19 Jun 2023 19:39:04 +0800
From:   Alan Huang <mmpgouride@...il.com>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     paulmck@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] list: Remove unnecessary WRITE_ONCE()


> 2023年6月19日 19:02,Eric Dumazet <edumazet@...gle.com> 写道:
> 
> On Mon, Jun 19, 2023 at 11:03 AM Alan Huang <mmpgouride@...il.com> wrote:
>> 
>> Commit c54a2744497d("list: Add hlist_unhashed_lockless()") added
>> various WRITE_ONCE() to pair with the READ_ONCE() in
>> hlist_unhashed_lockless(), but there is no need to protect
>> ->next with WRITE_ONCE(). Therefore, this commit removes those
>> unnecessary WRITE_ONCE().
> 
> Why are they unnecessary ?

There is no reader locklessly read ->next.

These functions are protected by something like spin_lock, only the thread running 
the function can access ->next.

> They seem just fine to me.
> Please elaborate.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ