bcachefs: Use bio_iov_vecs_to_alloc()
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 8 Mar 2022 18:52:58 +0000 (13:52 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:27 +0000 (17:09 -0400)
commit4d126dc8b30c2c1c69cbf600d604e7ceb8ca7f8d
tree3ef1a3ce01cddb8488b6883457274896bd027ce1
parent590b91cf3fa419eefc917f4e37152af616c3ba5f
bcachefs: Use bio_iov_vecs_to_alloc()

This fixes a bug in the DIO read path where, when using a loopback
device in DIO mode, we'd allocate a biovec that would get overwritten
and leaked in bio_iov_iter_get_pages() -> bio_iov_bvec_set().

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/fs-io.c