sched: Fix signedness bug in yield_to()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 23 May 2014 10:20:42 +0000 (13:20 +0300)
committerIngo Molnar <mingo@kernel.org>
Thu, 5 Jun 2014 09:52:13 +0000 (11:52 +0200)
commitfa93384f40deeb294fd29f2fdcadbd0ebc2dedf1
tree7948bf37a7b399f753937a311488b3f23b01622e
parent2538d960d0c74cdc639f05723e04a67aed1efdf9
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>
include/linux/kvm_host.h
include/linux/sched.h
kernel/sched/core.c
virt/kvm/kvm_main.c