[PATCH v3 0/2] nvme: fabrics and target fixes

Guixin Liu kanie at linux.alibaba.com
Mon Nov 16 00:12:09 PST 2026


Two remaining fixes from the previous rounds of this series:

 - a use-after-free in nvme_fc_match_disconn_ls(): no iterator is
   sound across the rport lock drop inside the loop, so the loop is
   reworked to run entirely under the rport lock and to take a
   reference only for the match; reproduced under KASAN through fcloop
 - a data race on the shared authentication transaction counter,
   reworked per review to a per-queue counter, dropping the shared
   ctrl->transaction field entirely

The other three patches from v2 are already resolved: the GFP_KERNEL
persistent reservation change and the tbkas configfs locking are in
nvme-7.4 now, and the reconnect_delay fix was superseded by an earlier
identical patch posted by someone else.

Both patches are verified on an initiator/target VM pair: the fc loop
is compile tested and exercised under KASAN through fcloop with six
controllers on one remote port across tbkas force-reconnect cycles
and concurrent disconnects with no reports; the
DH-HMAC-CHAP authenticated session including I/O covers the auth path.

Changes since v2:

 - rework the nvme-auth fix to a per-queue counter (Keith Busch),
   drop the now unused shared field, and add the Fixes tag (sashiko);
   the Reviewed-by on v2 covered the atomic_t variant and is dropped
 - resend the unchanged nvme-fc patch, still awaiting review
 - drop the reconnect_delay patch (superseded), the GFP_KERNEL patch
   (applied) and the tbkas patch (applied)

Link: https://lore.kernel.org/all/20261109022646.290792-1-kanie@linux.alibaba.com/

Guixin Liu (2):
  nvme-fc: fix use-after-free in nvme_fc_match_disconn_ls()
  nvme-auth: fix data race on ctrl->transaction

 drivers/nvme/host/auth.c |  3 +--
 drivers/nvme/host/fc.c   | 22 ++++++++++++----------
 drivers/nvme/host/nvme.h |  1 -
 3 files changed, 13 insertions(+), 13 deletions(-)

-- 
2.43.7




More information about the Linux-nvme mailing list