Skip to content

ublk: fix infinite loop in ublk server teardown

Uday Shankar linux-block linux-kselftest lkml 2 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected] change-id 20260403-cancel-bb6a1292534c

Versions newest first

  1. v2 Latest2 patches 4 repliesApplied
  2. v12 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- Add support for batched fetch in pre_fetch_io (Ming Lei)
- Link to v1: https://lore.kernel.org/r/[email protected]

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2ublk: reset per-IO canceled flag on each fetchdrivers/block/ublk_drv.c+13 -82 replies
2/2selftests: ublk: test that teardown after incomplete recovery completestools/testing/selftests/ublk/Makefile tools/testing/selftests/ublk/fault_inject.c tools/testing/selftests/ublk/kublk.c +2 more+95 -31 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMing Leizhang, the-essence-of-life
1/2R-b R-b
2/2R-b

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

Read the v2 thread

Cover letter [PATCH v2 0/2] ublk: fix infinite loop in ublk server teardown

Fix an infinite loop in ublk server teardown which can arise when a ublk server dies while recovering a device. Also add a test which demonstrates the problem and verifies the fix.

---
Changes in v2:
- Add support for batched fetch in pre_fetch_io (Ming Lei)
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Uday Shankar (2):
ublk: reset per-IO canceled flag on each fetch
selftests: ublk: test that teardown after incomplete recovery completes

 drivers/block/ublk_drv.c                        | 21 ++++++----
 tools/testing/selftests/ublk/Makefile           |  1 +
 tools/testing/selftests/ublk/fault_inject.c     | 52 +++++++++++++++++++++++--
 tools/testing/selftests/ublk/kublk.c            |  7 ++++
 tools/testing/selftests/ublk/kublk.h            |  3 ++
 tools/testing/selftests/ublk/test_generic_17.sh | 35 +++++++++++++++++
 6 files changed, 108 insertions(+), 11 deletions(-)

---
base-commit: cdd71b7feb3674d14c5edd9c133242ddf9a363f2
change-id: 20260403-cancel-bb6a1292534c

Best regards,

Signature · 1 line
Uday Shankar <[email protected]>