]> git.baikalelectronics.ru Git - kernel.git/commit
mm: call flush_dcache_page() in memcpy_to_page() and memzero_page()
authorChristoph Hellwig <hch@lst.de>
Fri, 23 Jul 2021 22:50:17 +0000 (15:50 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 24 Jul 2021 00:43:28 +0000 (17:43 -0700)
commitf57c2bb29c14acc8a18439777a78a0d80317d38f
treeed9848784ee4edb85c760823501df4dc5be134a8
parent8bf9c6952277111989d663a315b9d6383160178a
mm: call flush_dcache_page() in memcpy_to_page() and memzero_page()

memcpy_to_page and memzero_page can write to arbitrary pages, which
could be in the page cache or in high memory, so call
flush_kernel_dcache_pages to flush the dcache.

This is a problem when using these helpers on dcache challeneged
architectures.  Right now there are just a few users, chances are no one
used the PC floppy driver, the aha1542 driver for an ISA SCSI HBA, and a
few advanced and optional btrfs and ext4 features on those platforms yet
since the conversion.

Link: https://lkml.kernel.org/r/20210713055231.137602-2-hch@lst.de
Fixes: baf49f20f9d5 ("mm/highmem: Lift memcpy_[to|from]_page to core")
Fixes: bf08e72595ff ("iov_iter: lift memzero_page() to highmem.h")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Cc: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/highmem.h