aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2014-05-23 13:20:42 +0300
committerIngo Molnar <[email protected]>2014-06-05 11:52:13 +0200
commitfa93384f40deeb294fd29f2fdcadbd0ebc2dedf1 (patch)
tree7948bf37a7b399f753937a311488b3f23b01622e /kernel
parent2538d960d0c74cdc639f05723e04a67aed1efdf9 (diff)
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 <[email protected]> Reviewed-by: Raghavendra <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Cc: Gleb Natapov <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/20140523102042.GA7267@mwanda Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 321d800e4baa..afcc84234a3e 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4195,7 +4195,7 @@ EXPORT_SYMBOL(yield);
* false (0) if we failed to boost the target.
* -ESRCH if there's no task to yield to.
*/
-bool __sched yield_to(struct task_struct *p, bool preempt)
+int __sched yield_to(struct task_struct *p, bool preempt)
{
struct task_struct *curr = current;
struct rq *rq, *p_rq;