Skip to content

dlm: various fixes

Alexander Aring gfs2 sashiko-reviews 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 3 repliesIn review
  2. v14 patches 0 repliesSuperseded

changes since v2 from the cover letter

- add patch to fix the socket hang on send buffer limitation
- drop the Assisted-by tags

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5dlm: fix socket hang on send buffer limitation with socket errorfs/dlm/lowcomms.c+33 -142 replies
2/5dlm: reject wrapped messages with oversized inner lengthsfs/dlm/midcomms.c+8 -00 replies
3/5dlm: don't publish a lkb in ls_lkbxa before it has an rsbfs/dlm/lock.c+62 -281 reply
4/5dlm: don't set RSB_MASTER_UNCERTAIN on rsb with no masterfs/dlm/lock.c+6 -20 replies
5/5dlm: fix memory leak on active leaving memberfs/dlm/config.c+9 -00 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchAlexander Aring
1/5
2/5A-b
3/5A-b
4/5A-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCHv2 RESEND v7.4-rc3 0/5] dlm: various fixes

Hi David,

This patch series contains mostly AI-assisted fixes and cleanups across the DLM subsystem:

- Add missing length checks for oversized inner DLM messages, this prevents potential buffer overruns or malformed packet handling.

- Enforce RSB assignment before using LKBs, this ensures LKBs cannot exist in lkbxa without an associated RSB set. It resolves an issue with concurrent DLM user requests.

- Prevent DLM_ASSERT() on canceled pending requests, this fixes an assertion failure triggered when a initial request is canceled and recovery is triggered during this state.

- Fix lockspace node memory leak during release, this resolves a leak involving delayed member removal during active lockspace releasing members. Active releasing members will not run recovery so the delayed cleanup of removed of members will never occur.

- Fixes a case where the reconnect mechanism gets stuck if a socket error occurs while the socket send buffer is full. This was found by the netdev-bot (sashik AI bot) [3]. I tested it with tcpkill again, and everything still seems to run fine. To test this specific case, I used netem to slow down networking so the socket buffer would fill up while running tcpkill to trigger socket errors.

Ensuring that LKBs always have an RSB assigned should also reduce the likelihood of subtle bugs elsewhere in the codebase where an RSB presence check might be missing.

There is a pending sysfs fix [0] that conflicts with [1]. The fix for
[1] does not go through the dlm tree so [0] is delayed until [1] is available.

- Alex

[0] https://lore.kernel.org/gfs2/[email protected]/
[1] https://lore.kernel.org/gfs2/[email protected]/
[2] https://lore.kernel.org/gfs2/[email protected]/

changes since v2:
- add patch to fix the socket hang on send buffer limitation
- drop the Assisted-by tags

Alexander Aring (2):
dlm: fix socket hang on send buffer limitation with socket error
dlm: fix memory leak on active leaving member

Ameer Hamza (1):
dlm: don't set RSB_MASTER_UNCERTAIN on rsb with no master

Jérémy Jean (1):
dlm: reject wrapped messages with oversized inner lengths

Yogesh Gaur (1):
dlm: don't publish a lkb in ls_lkbxa before it has an rsb

 fs/dlm/config.c   |  9 +++++
 fs/dlm/lock.c     | 98 ++++++++++++++++++++++++++++++++---------------
 fs/dlm/lowcomms.c | 47 ++++++++++++++++-------
 fs/dlm/midcomms.c |  8 ++++
 4 files changed, 118 insertions(+), 44 deletions(-)
Signature · 1 line
2.43.0