diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-05-23 14:20:42 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-06-05 13:52:13 +0400 |
commit | fa93384f40deeb294fd29f2fdcadbd0ebc2dedf1 (patch) | |
tree | 7948bf37a7b399f753937a311488b3f23b01622e /include/linux/sched.h | |
parent | 2538d960d0c74cdc639f05723e04a67aed1efdf9 (diff) | |
download | linux-fa93384f40deeb294fd29f2fdcadbd0ebc2dedf1.tar.xz |
sched: Fix signedness bug in yield_to()
yield_to() is supposed to return -ESRCH if there is no task to
yield to, but because the type is bool that is the same as returning
true.
The only place I see which cares is kvm_vcpu_on_spin().
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Raghavendra <raghavendra.kt@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org
Link: http://lkml.kernel.org/r/20140523102042.GA7267@mwanda
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 0f91d00efd87..6790c3b42072 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2180,7 +2180,7 @@ static inline void sched_autogroup_fork(struct signal_struct *sig) { } static inline void sched_autogroup_exit(struct signal_struct *sig) { } #endif -extern bool yield_to(struct task_struct *p, bool preempt); +extern int yield_to(struct task_struct *p, bool preempt); extern void set_user_nice(struct task_struct *p, long nice); extern int task_prio(const struct task_struct *p); /** |