summaryrefslogtreecommitdiff
path: root/security/apparmor/policy_unpack.c
diff options
context:
space:
mode:
authorArtur Rojek <contact@artur-rojek.eu>2023-05-27 19:44:50 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-19 17:36:49 +0300
commite9e33faea104381bac80ac79328f0540fc2969f2 (patch)
tree968e4f4b211533cc96043e491dae466e5fb76fc4 /security/apparmor/policy_unpack.c
parent96524810c654ba60b4fd24f28d88ca592e078511 (diff)
downloadlinux-e9e33faea104381bac80ac79328f0540fc2969f2.tar.xz
sh: dma: Fix DMA channel offset calculation
[ Upstream commit e82e47584847129a20b8c9f4a1dcde09374fb0e0 ] Various SoCs of the SH3, SH4 and SH4A family, which use this driver, feature a differing number of DMA channels, which can be distributed between up to two DMAC modules. The existing implementation fails to correctly accommodate for all those variations, resulting in wrong channel offset calculations and leading to kernel panics. Rewrite dma_base_addr() in order to properly calculate channel offsets in a DMAC module. Fix dmaor_read_reg() and dmaor_write_reg(), so that the correct DMAC module base is selected for the DMAOR register. Fixes: 7f47c7189b3e8f19 ("sh: dma: More legacy cpu dma chainsawing.") Signed-off-by: Artur Rojek <contact@artur-rojek.eu> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Link: https://lore.kernel.org/r/20230527164452.64797-2-contact@artur-rojek.eu Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'security/apparmor/policy_unpack.c')
0 files changed, 0 insertions, 0 deletions