Commit df308a1
block: fix aligning of bounced dio read bios
bio_iov_iter_align_down expects the "normal" biovec layout from vector 0,
while bio_iov_iter_bounce_read abuses vector 0 for a bounce buffer
allocation. Pass an explicit bvec to bio_iov_iter_align_down to deal
with this case to avoid a double unpin.
Additionally we need to free the folio if no bio_vec could be added,
and adjust the size of the first bio_vec that contains the bounce buffer
when the I/O size is aligned down.
Fixes: e7b8b3c ("block: align down bounces bios")
Reported-by: 0wnerD1ed <l7z@0b1t.tech>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: 0wnerD1ed <l7z@0b1t.tech>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Link: https://patch.msgid.link/20260716091306.316625-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 4f221ef commit df308a1
1 file changed
Lines changed: 28 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1199 | 1199 | | |
1200 | 1200 | | |
1201 | 1201 | | |
1202 | | - | |
| 1202 | + | |
1203 | 1203 | | |
1204 | 1204 | | |
1205 | 1205 | | |
| |||
1208 | 1208 | | |
1209 | 1209 | | |
1210 | 1210 | | |
1211 | | - | |
1212 | | - | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | | - | |
| 1211 | + | |
1219 | 1212 | | |
1220 | 1213 | | |
1221 | 1214 | | |
1222 | | - | |
| 1215 | + | |
| 1216 | + | |
1223 | 1217 | | |
1224 | | - | |
1225 | | - | |
1226 | | - | |
1227 | | - | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
1228 | 1221 | | |
1229 | 1222 | | |
1230 | 1223 | | |
| |||
1284 | 1277 | | |
1285 | 1278 | | |
1286 | 1279 | | |
1287 | | - | |
| 1280 | + | |
| 1281 | + | |
1288 | 1282 | | |
1289 | 1283 | | |
1290 | 1284 | | |
| |||
1369 | 1363 | | |
1370 | 1364 | | |
1371 | 1365 | | |
1372 | | - | |
| 1366 | + | |
| 1367 | + | |
1373 | 1368 | | |
1374 | 1369 | | |
1375 | 1370 | | |
1376 | 1371 | | |
1377 | 1372 | | |
1378 | 1373 | | |
1379 | 1374 | | |
| 1375 | + | |
1380 | 1376 | | |
1381 | 1377 | | |
1382 | 1378 | | |
1383 | 1379 | | |
1384 | 1380 | | |
1385 | 1381 | | |
1386 | | - | |
1387 | | - | |
1388 | 1382 | | |
1389 | 1383 | | |
1390 | 1384 | | |
1391 | | - | |
1392 | | - | |
1393 | | - | |
1394 | | - | |
| 1385 | + | |
| 1386 | + | |
1395 | 1387 | | |
1396 | 1388 | | |
1397 | 1389 | | |
| |||
1407 | 1399 | | |
1408 | 1400 | | |
1409 | 1401 | | |
1410 | | - | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
1411 | 1416 | | |
1412 | 1417 | | |
1413 | 1418 | | |
| |||
0 commit comments