aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
diff options
context:
space:
mode:
authorPhil Elwell <phil@raspberrypi.org>2017-05-04 10:58:20 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-15 11:48:44 +0200
commitff92b9e3c9f85fa442c430d70bf075499e1193b7 (patch)
treec1ae9705fbd14cae208a2454d8584df20b1ad0c0 /drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
parentstaging: ccree: remove extraneous spin_unlock_bh() in error handler (diff)
downloadlinux-dev-ff92b9e3c9f85fa442c430d70bf075499e1193b7.tar.xz
linux-dev-ff92b9e3c9f85fa442c430d70bf075499e1193b7.zip
staging: vc04_services: Fix bulk cache maintenance
vchiq_arm supports transfers less than one page and at arbitrary alignment, using the dma-mapping API to perform its cache maintenance (even though the VPU drives the DMA hardware). Read (DMA_FROM_DEVICE) operations use cache invalidation for speed, falling back to clean+invalidate on partial cache lines, with writes (DMA_TO_DEVICE) using flushes. If a read transfer has ends which aren't page-aligned, performing cache maintenance as if they were whole pages can lead to memory corruption since the partial cache lines at the ends (and any cache lines before or after the transfer area) will be invalidated. This bug was masked until the disabling of the cache flush in flush_dcache_page(). Honouring the requested transfer start- and end-points prevents the corruption. Fixes: cf9caf192988 ("staging: vc04_services: Replace dmac_map_area with dmac_map_sg") Signed-off-by: Phil Elwell <phil@raspberrypi.org> Cc: stable <stable@vger.kernel.org> # 4.10 Reported-by: Stefan Wahren <stefan.wahren@i2se.com> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c')
0 files changed, 0 insertions, 0 deletions