summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2026-07-13 21:24:38 +0200
committerMikulas Patocka <mpatocka@redhat.com>2026-07-13 21:32:24 +0200
commit553f9a9a36a600977f01bfbcc8139ce0ca419384 (patch)
tree892fd2980f1b77bf075d8ccb953eaad996160267
parent4e53905a9da1736a448ab89f455ce3454de9e633 (diff)
downloadlinux-next-553f9a9a36a600977f01bfbcc8139ce0ca419384.tar.gz
linux-next-553f9a9a36a600977f01bfbcc8139ce0ca419384.zip
dm-integrity: fix wrong fallthrough in integrity_bio_wait
If dm_integrity_map_inline returned DM_MAPIO_KILL, the code would set status BLK_STS_IOERR and then incorrectly fall through and submit the bio. Luckily, dm_integrity_map_inline can't return DM_MAPIO_KILL at this point, so the bug is just theoretical. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Assisted-by: Claude:claude-opus-4.6
-rw-r--r--drivers/md/dm-integrity.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index e65aec9b7a28..5156079785dc 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -2782,7 +2782,8 @@ static void integrity_bio_wait(struct work_struct *w)
switch (r) {
case DM_MAPIO_KILL:
bio->bi_status = BLK_STS_IOERR;
- fallthrough;
+ bio_endio(bio);
+ return;
case DM_MAPIO_REMAPPED:
submit_bio_noacct(bio);
fallthrough;