bcachefs: fix invalid free in dio write path
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 31 Dec 2023 01:52:18 +0000 (20:52 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 1 Jan 2024 16:43:03 +0000 (11:43 -0500)
commitf2eb8434e4fec891ae842183b9193ae759ee6d78
tree0148f7063cdb6065e0a2e7994b805b37fdc4a840
parentfa014953f9409edd32b04cb5c0f4167b8a537e65
bcachefs: fix invalid free in dio write path

turns out iterate_iovec() mutates __iov, we need to save our own copy

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Reported-by: Marcin Mirosław <marcin@mejor.pl>
fs/bcachefs/fs-io-direct.c