aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 6af210a7de70..de0bd26e520a 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3780,7 +3780,7 @@ int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner)
3780 * the mutex owner just released it and exited. 3780 * the mutex owner just released it and exited.
3781 */ 3781 */
3782 if (probe_kernel_address(&owner->cpu, cpu)) 3782 if (probe_kernel_address(&owner->cpu, cpu))
3783 goto out; 3783 return 0;
3784#else 3784#else
3785 cpu = owner->cpu; 3785 cpu = owner->cpu;
3786#endif 3786#endif
@@ -3790,14 +3790,14 @@ int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner)
3790 * the cpu field may no longer be valid. 3790 * the cpu field may no longer be valid.
3791 */ 3791 */
3792 if (cpu >= nr_cpumask_bits) 3792 if (cpu >= nr_cpumask_bits)
3793 goto out; 3793 return 0;
3794 3794
3795 /* 3795 /*
3796 * We need to validate that we can do a 3796 * We need to validate that we can do a
3797 * get_cpu() and that we have the percpu area. 3797 * get_cpu() and that we have the percpu area.
3798 */ 3798 */
3799 if (!cpu_online(cpu)) 3799 if (!cpu_online(cpu))
3800 goto out; 3800 return 0;
3801 3801
3802 rq = cpu_rq(cpu); 3802 rq = cpu_rq(cpu);
3803 3803
@@ -3816,7 +3816,7 @@ int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner)
3816 3816
3817 cpu_relax(); 3817 cpu_relax();
3818 } 3818 }
3819out: 3819
3820 return 1; 3820 return 1;
3821} 3821}
3822#endif 3822#endif