bcachefs: Fix memory corruption in encryption path
authorKent Overstreet <kent.overstreet@gmail.com>
Fri, 3 Jun 2022 06:34:14 +0000 (02:34 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:33 +0000 (17:09 -0400)
commit636d4eef1eefe447deef134bdf8e34c979ff009e
tree60666fd80b382c88370d9012c4fb5bfe343f4f09
parent0fbf71f80d60c077f491f0ac97000c3a0c9be3aa
bcachefs: Fix memory corruption in encryption path

When do_encrypt() was passed a vmalloc address and the buffer spanned
more than a single page, we were encrypting/decrypting completely
different pages than the ones intended.

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