module: zfs: zio_inject: zio_match_handler: don't << -1
Caught by UBSAN: ZI_NO_DVA is passed explicitly in zio_handle_decrypt_injection() and can be an ENOENT from zio_match_dva() Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13146 Closes #13190
This commit is contained in:
parent
56a0699e5e
commit
dad2b19fff
|
@ -148,7 +148,8 @@ zio_match_handler(const zbookmark_phys_t *zb, uint64_t type, int dva,
|
||||||
zb->zb_level == record->zi_level &&
|
zb->zb_level == record->zi_level &&
|
||||||
zb->zb_blkid >= record->zi_start &&
|
zb->zb_blkid >= record->zi_start &&
|
||||||
zb->zb_blkid <= record->zi_end &&
|
zb->zb_blkid <= record->zi_end &&
|
||||||
(record->zi_dvas == 0 || (record->zi_dvas & (1ULL << dva))) &&
|
(record->zi_dvas == 0 ||
|
||||||
|
(dva != ZI_NO_DVA && (record->zi_dvas & (1ULL << dva)))) &&
|
||||||
error == record->zi_error) {
|
error == record->zi_error) {
|
||||||
return (freq_triggered(record->zi_freq));
|
return (freq_triggered(record->zi_freq));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue