[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7c391960-4406-4089-991e-d54ecc45524f@linux.dev>
Date: Mon, 11 Mar 2024 09:17:51 +0100
From: Zhu Yanjun <yanjun.zhu@...ux.dev>
To: linke li <lilinke99@...com>, gregsword0@...il.com
Cc: bmt@...ich.ibm.com, jgg@...pe.ca, leon@...nel.org,
linux-kernel@...r.kernel.org, linux-rdma@...r.kernel.org
Subject: Re: [PATCH] RDMA/siw: Reuse value read using READ_ONCE instead of
re-reading it
In the original source code, READ_ONCE(xxx) is in if test. In your
commit, you move READ_ONCE out of this if test.
So the time slot exists between fetching and using. In the original
source code, it does not exist. And the fetching and using are not
protected by locks. As is suggested by Leon.
This will introduce risks.
The binary is based on optimization level and architectures. It is very
complicated.
Zhu Yanjun
On 11.03.24 03:57, linke li wrote:
>> This is not a smp problem. Compared with the original source, your
>> commit introduces a time slot.
> I don't know what do you mean by a time slot. In the binary level, they
> have the same code.
>
Powered by blists - more mailing lists