[dm-devel] [PATCH] block: fix a crash when bio_for_each_folio_all iterates over an empty bio

Matthew Wilcox willy at infradead.org
Mon Apr 17 19:32:54 UTC 2023


On Mon, Apr 17, 2023 at 03:11:57PM -0400, Mikulas Patocka wrote:
> If we use bio_for_each_folio_all on an empty bio, it will access the first
> bio vector unconditionally (it is uninitialized) and it may crash
> depending on the uninitialized data.

Wait, how do we have an empty bio in the first place?



More information about the dm-devel mailing list