• Russell King's avatar
    [ARM] Do not call flush_tlb_kernel_range() with IRQs disabled. · 5edf71ae
    Russell King authored
    We must not call TLB maintainence operations with interrupts disabled,
    otherwise we risk a lockup in the SMP IPI code.
    
    This means that consistent_free() can not be called from a context with
    IRQs disabled.  In addition, we must not hold the lock in consistent_free
    when we call flush_tlb_kernel_range().  However, we must continue to
    prevent consistent_alloc() from re-using the memory region until we've
    finished tearing down the mapping and dealing with the TLB.
    
    Therefore, leave the vm_region entry in the list, but mark it inactive
    before dropping the lock and starting the tear-down process.  After the
    mapping has been torn down, re-acquire the lock and remove the entry
    from the list.
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    5edf71ae
consistent.c 10.4 KB