mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cen Zhang <zzzccc427@gmail.com>
To: Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>,
	Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	ocfs2-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
	baijiaju1990@gmail.com, zzzccc427@gmail.com
Subject: [PATCH 0/2] ocfs2: harden heartbeat teardown races
Date: Wed, 24 Jun 2026 17:53:08 +0800	[thread overview]
Message-ID: <20260624095310.763763-1-zzzccc427@gmail.com> (raw)

Hi,

This series fixes two OCFS2 heartbeat/o2net teardown races found by
KASAN.

This series is based on my earlier patch:

  [PATCH v2] ocfs2/cluster: keep heartbeat local node stable

That patch has been queued in Andrew's -mm tree as:

  ocfs2-cluster-keep-heartbeat-local-node-stable.patch

It is needed as the base because this series uses the stable per-region
heartbeat node number from that patch instead of re-reading
o2nm_this_node() during teardown.

Patch 1 stops heartbeat callbacks from queuing o2net reconnect and
disconnect work after local o2net teardown has started, while still
keeping the callbacks registered for quorum state.

Patch 2 keeps a heartbeat region non-armable while it is starting or
stopping, unregisters negotiate handlers before tearing down state they
can reach, and waits for the active or destroying o2net ordered
workqueue before freeing the region.

Thanks,
Cen

Cen Zhang (2):
  ocfs2: synchronize heartbeat callbacks with o2net teardown
  ocfs2: o2hb: quiesce negotiate handlers and timeout work

 fs/ocfs2/cluster/heartbeat.c   |  99 ++++++++++++++----
 fs/ocfs2/cluster/heartbeat.h   |   5 +
 fs/ocfs2/cluster/nodemanager.c |   4 +
 fs/ocfs2/cluster/tcp.c         | 186 +++++++++++++++++++++++++++------
 fs/ocfs2/cluster/tcp.h         |   2 +
 5 files changed, 247 insertions(+), 49 deletions(-)

-- 
2.43.0

             reply	other threads:[~2026-06-24  9:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24  9:53 Cen Zhang [this message]
2026-06-24  9:53 ` [PATCH 1/2] ocfs2: synchronize heartbeat callbacks with o2net teardown Cen Zhang
2026-07-24  1:40   ` Joseph Qi
2026-06-24  9:53 ` [PATCH 2/2] ocfs2: o2hb: quiesce negotiate handlers and timeout work Cen Zhang
2026-07-24  1:41   ` Joseph Qi
2026-07-06  8:56 ` [PATCH 0/2] ocfs2: harden heartbeat teardown races Cen Zhang
2026-07-26  4:02 ` Andrew Morton
2026-07-26  6:58   ` Joseph Qi
2026-07-27  3:13     ` Cen Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260624095310.763763-1-zzzccc427@gmail.com \
    --to=zzzccc427@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=baijiaju1990@gmail.com \
    --cc=jlbec@evilplan.org \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@fasheh.com \
    --cc=ocfs2-devel@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®