.. | .. |
---|
14 | 14 | #include <linux/sched/mm.h> |
---|
15 | 15 | #include <linux/sched/task.h> |
---|
16 | 16 | #include <linux/kthread.h> |
---|
| 17 | +#include <linux/irq_pipeline.h> |
---|
17 | 18 | #include <linux/completion.h> |
---|
18 | 19 | #include <linux/err.h> |
---|
19 | 20 | #include <linux/cgroup.h> |
---|
.. | .. |
---|
1331 | 1332 | { |
---|
1332 | 1333 | struct mm_struct *active_mm; |
---|
1333 | 1334 | struct task_struct *tsk = current; |
---|
| 1335 | + unsigned long flags; |
---|
1334 | 1336 | |
---|
1335 | 1337 | WARN_ON_ONCE(!(tsk->flags & PF_KTHREAD)); |
---|
1336 | 1338 | WARN_ON_ONCE(tsk->mm); |
---|
.. | .. |
---|
1339 | 1341 | /* Hold off tlb flush IPIs while switching mm's */ |
---|
1340 | 1342 | local_irq_disable(); |
---|
1341 | 1343 | active_mm = tsk->active_mm; |
---|
| 1344 | + protect_inband_mm(flags); |
---|
1342 | 1345 | if (active_mm != mm) { |
---|
1343 | 1346 | mmgrab(mm); |
---|
1344 | 1347 | tsk->active_mm = mm; |
---|
1345 | 1348 | } |
---|
1346 | 1349 | tsk->mm = mm; |
---|
1347 | 1350 | switch_mm_irqs_off(active_mm, mm, tsk); |
---|
| 1351 | + unprotect_inband_mm(flags); |
---|
1348 | 1352 | local_irq_enable(); |
---|
1349 | 1353 | task_unlock(tsk); |
---|
1350 | 1354 | #ifdef finish_arch_post_lock_switch |
---|