Repository navigation
Commit b22366c
committed
context_tracking: Restore preempted context state after preempt_schedule_irq()
From the context tracking POV, preempt_schedule_irq() behaves pretty much
like an exception: It can be called anytime and schedule another task.
But currently it doesn't restore the context tracking state of the preempted
code on preempt_schedule_irq() return.
As a result, if preempt_schedule_irq() is called in the tiny frame between
user_enter() and the actual return to userspace, we resume userspace with
the wrong context tracking state.
Fix this by using exception_enter/exit() which are a perfect fit for this
kind of issue.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Mats Liljegren <mats.liljegren@enea.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>1 parent 6c1e025 commit b22366c
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3082 | 3082 | | |
3083 | 3083 | | |
3084 | 3084 | | |
| 3085 | + | |
3085 | 3086 | | |
3086 | 3087 | | |
3087 | 3088 | | |
3088 | 3089 | | |
3089 | | - | |
| 3090 | + | |
| 3091 | + | |
3090 | 3092 | | |
3091 | 3093 | | |
3092 | 3094 | | |
| |||
3100 | 3102 | | |
3101 | 3103 | | |
3102 | 3104 | | |
| 3105 | + | |
| 3106 | + | |
3103 | 3107 | | |
3104 | 3108 | | |
3105 | 3109 | | |
| |||
0 commit comments