Commit 58c2f69a authored by Philippe Gerum's avatar Philippe Gerum
Browse files

arm64/ipipe: disable preemption around deferred mm switch

deferred_switch_mm() refers to CPU-local data and always runs from the
root domain, preemption must be disabled around it as we may enter
with IRQs enabled.
parent 8fb37faa
......@@ -170,6 +170,7 @@ static inline void deferred_switch_mm(struct mm_struct *next)
finish_arch_post_lock_switch
static inline void finish_arch_post_lock_switch(void)
{
preempt_disable();
if (test_and_clear_thread_flag(TIF_SWITCH_MM)) {
struct mm_struct *mm = current->mm;
unsigned long flags;
......@@ -180,6 +181,7 @@ static inline void finish_arch_post_lock_switch(void)
deferred_switch_mm(mm);
ipipe_mm_switch_unprotect(flags);
}
preempt_enable();
}
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment