• Russell King's avatar
    ARM: make_coherent: fix problems with highpte, part 1 · 56dd4709
    Russell King authored
    update_mmu_cache() is called with a page table already mapped.  We
    call make_coherent(), which then calls adjust_pte() which wants to
    map other page tables.  This causes kmap_atomic() to BUG() because
    the slot its trying to use is already taken.
    
    Since do_adjust_pte() modifies the page tables, we are also missing
    any form of locking, so we're risking corrupting the page tables.
    
    Fix this by using pte_offset_map_nested(), and taking the pte page
    table lock around do_adjust_pte().
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    56dd4709
fault-armv.c 5.96 KB