Re: [PATCH] ocfs2: fix race between ocfs2_control_install_private() and ocfs2_control_release()
Joseph Qi <[email protected]> Tue, 2 Jun 2026 13:37:58 +0800
| Newsgroups | dev.linux.lists.ocfs2-devel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 6/2/26 12:18 PM, Heming Zhao wrote:
> On Mon, Jun 01, 2026 at 08:16:18PM +0800, Joseph Qi wrote:
>> Move atomic_inc(&ocfs2_control_opened) and the handshake state update
>> inside ocfs2_control_lock to close a race window where
>> ocfs2_control_release() can observe ocfs2_control_opened dropping to
>> zero (resetting ocfs2_control_this_node and running_proto) while
>> ocfs2_control_install_private() is about to bump the counter and mark
>> the connection valid.
>>
>> Fixes: 3cfd4ab6b6b4 ("ocfs2: Add the local node id to the handshake.")
>> Reported-by: Ginger <[email protected]>
>
> The code looks good to me, but above email address is not valid.
> The correct should be: <[email protected]>
>
Oops, my mistake. Thank you for pointing out this.
Thanks,
Joseph