[PATCH net v3 0/3] net/smc: fix link group scheduling, registration and work lifetime
From: Chengfeng Ye
Date: Tue Oct 13 2026 - 05:23:56 EST
This revises the two-patch v2 series and adds a separate fix for the
running-free_work lifetime issue identified during review.
Patch 1 serializes delayed-work admission with the freeing transition.
Patch 2 gives early cleanup a single teardown owner, pins its callers,
and rejects first registration after teardown has claimed a new group.
Patch 3 gives queued/running free work its own group reference while
retaining asynchronous cancellation to avoid the existing wait cycle.
Each patch is a complete logical change. The work-reference acquisition,
cancellation and release changes all appear together in patch 3. Patches
2 and 3 record their prerequisites in their permanent commit messages.
The pre-existing callback issue remains until patch 3; no earlier commit
acquires a work reference that needs a later patch to release it.
The original KASAN excerpts in patches 1 and 2 came from instrumented
runs. The registration and running-callback gaps were identified by
source review. No new runtime reproduction is claimed.
Changes since v2:
- Serialize first registration with the freeing claim, and clear conn->lgr
when registration is rejected before it acquires a connection reference.
- Add the running-work lifetime fix as a separate third patch.
- Correct the cancellation comment and document commit dependencies.
- Rebase onto current net/main and validate each cumulative revision.
Validation:
- Applied the exported patches one at a time in a clean worktree; each
resulting tree and commit message matches the corresponding source commit.
- Built net/smc/ with W=1 after each patch, with CONFIG_IPV6=y and disabled
(six successful builds; CONFIG_SMC, DIBS and INFINIBAND enabled).
- Strict checkpatch: zero errors, warnings and checks for all three patches.
- Runtime and SMC hardware testing have not been performed.
v2: https://lore.kernel.org/r/20261003183237.2284245-1-nicoyip.dev@xxxxxxxxx/
v1 scheduling: https://lore.kernel.org/r/20260927074520.3694663-1-nicoyip.dev@xxxxxxxxx/
v1 early cleanup: https://lore.kernel.org/r/20260927063607.3691520-1-nicoyip.dev@xxxxxxxxx/
Chengfeng Ye (3):
net/smc: serialize link group free work scheduling
net/smc: serialize early link group cleanup with termination
net/smc: hold a link group reference for free work
net/smc/af_smc.c | 8 +++++--
net/smc/smc_core.c | 59 +++++++++++++++++++++++++++++++++++-----------
net/smc/smc_core.h | 2 +-
3 files changed, 52 insertions(+), 17 deletions(-)
base-commit: aaaaf87ea99b8766c9a8aa0e71aa42e6bc8a5320
--
2.43.0