[PATCH for-rc 0/3] block: error injection delay fixes

From: Md Haris Iqbal

Date: Sat Dec 05 2026 - 09:19:40 EST


Hi Jens,

Please consider these for the current rc. They fix the error injection
delay_us option added in 6bd856cc9996 ("block: allow error injection
rules to delay bios").

1: fail a delayed bio if its disk was removed; unbinding sd while a bio
is delayed oopses without it.
2: clear BIO_ERROR_INJECTED in bio_set_dev(), so it only covers the
device the bio was delayed on.
3: copy the flag to bio_split() splits, so raid10's discard split isn't
checked twice.

Tested in a VM with null_blk, nvme-loop and scsi_debug.

Claude helped with the fixes and was used to review them. I went through
all of it and tested it myself.

Md Haris Iqbal (3):
block: fail a delayed bio if its disk was removed
block: clear BIO_ERROR_INJECTED when a bio changes device
block: copy BIO_ERROR_INJECTED to the split in bio_split()

Documentation/block/error-injection.rst | 6 +++---
block/bio.c | 2 ++
block/error-injection.c | 10 ++++++++--
include/linux/bio.h | 4 +++-
4 files changed, 16 insertions(+), 6 deletions(-)

--
2.53.0