ARM: mmu: fix cache flushing when replacing a section with a PTE
When replacing a section with a PTE, we must make sure that the newly
initialized PTE entries are flushed from the cache before changing the
entry in the TTB. Otherwise a L1 TLB miss causes the hardware pagetable
walker to walk into a PTE with undefined content, causing exactly that
behaviour.

Move all the necessary cache flushing to arm_create_pte(), to avoid any
caller getting this wrong in the future.

Fixes: e3e54c644180 (ARM: mmu: Implement on-demand PTE allocation)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
1 parent 87c08ac commit 7ba0f2d29959256025ece9ae961a6c3421445a7f
@Lucas Stach Lucas Stach authored on 25 Jul 2018
Showing 1 changed file
View
arch/arm/cpu/mmu.c