Messages in this thread | | | Date | Mon, 11 Mar 2024 09:17:51 +0100 | Subject | Re: [PATCH] RDMA/siw: Reuse value read using READ_ONCE instead of re-reading it | From | Zhu Yanjun <> |
| |
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. >
| |