In the Linux kernel, the following vulnerability has been resolved:
block: Fix iterating over an empty bio with bioforeachfolioall
If the bio contains no data, biofirstfolio() calls pagefolio() on a NULL pointer and oopses. Move the test that we've reached the end of the bio from bionextfolio() to biofirst_folio().
[axboe: add unlikely() to error case]