diff options
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index a9dd6f96c731..60fbae0c747c 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -3794,6 +3794,7 @@ asmlinkage void __sched schedule(void) | |||
3794 | 3794 | ||
3795 | need_resched: | 3795 | need_resched: |
3796 | preempt_disable(); | 3796 | preempt_disable(); |
3797 | sched_state_entered_schedule(); | ||
3797 | cpu = smp_processor_id(); | 3798 | cpu = smp_processor_id(); |
3798 | rq = cpu_rq(cpu); | 3799 | rq = cpu_rq(cpu); |
3799 | rcu_note_context_switch(cpu); | 3800 | rcu_note_context_switch(cpu); |
@@ -3872,7 +3873,7 @@ need_resched_nonpreemptible: | |||
3872 | 3873 | ||
3873 | post_schedule(rq); | 3874 | post_schedule(rq); |
3874 | 3875 | ||
3875 | if (unlikely(reacquire_kernel_lock(prev))) | 3876 | if (sched_state_validate_switch() || unlikely(reacquire_kernel_lock(prev))) |
3876 | goto need_resched_nonpreemptible; | 3877 | goto need_resched_nonpreemptible; |
3877 | 3878 | ||
3878 | preempt_enable_no_resched(); | 3879 | preempt_enable_no_resched(); |