Coly Li 2878feaed5 bcache: Revert "bcache: use bvec_virt"
This reverts commit 2fd3e5efe791946be0957c8e1eed9560b541fe46.

The above commit replaces page_address(bv->bv_page) by bvec_virt(bv) to
avoid directly access to bv->bv_page, but in situation bv->bv_offset is
not zero and page_address(bv->bv_page) is not equal to bvec_virt(bv). In
such case a memory corruption may happen because memory in next page is
tainted by following line in do_btree_node_write(),
	memcpy(bvec_virt(bv), addr, PAGE_SIZE);

This patch reverts the mentioned commit to avoid the memory corruption.

Fixes: 2fd3e5efe791 ("bcache: use bvec_virt")
Signed-off-by: Coly Li <colyli@suse.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org # 5.15
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211103151041.70516-1-colyli@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-11-08 06:23:17 -07:00
..
2021-08-10 13:32:40 -04:00
2021-02-26 15:49:51 -07:00
2021-10-21 09:00:56 -06:00
2021-06-04 12:07:37 -04:00
2021-08-16 10:50:32 -06:00
2021-08-10 13:32:40 -04:00
2020-12-16 13:09:32 -08:00
2021-06-14 22:32:07 -07:00
2021-06-14 22:32:07 -07:00