[PATCH] dm-integrity: fix wrong fallthrough in integrity_bio_wait
Mikulas Patocka <[email protected]> Mon, 13 Jul 2026 21:24:38 +0200 (CEST)
| Newsgroups | dev.linux.lists.dm-devel |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> Assisted-by: Claude:claude-opus-4.6 --- drivers/md/dm-integrity.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: linux-2.6/drivers/md/dm-integrity.c =================================================================== --- linux-2.6.orig/drivers/md/dm-integrity.c 2026-07-13 21:00:46.000000000 +0200 +++ linux-2.6/drivers/md/dm-integrity.c 2026-07-13 21:00:46.000000000 +0200 @@ -2782,7 +2782,8 @@ static void integrity_bio_wait(struct wo 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;