Skip to content
Commit b14ed2c2 authored by Richard Weinberger's avatar Richard Weinberger Committed by Ingo Molnar
Browse files

sched: Fix sched_policy < 0 comparison



attr.sched_policy is u32, therefore a comparison against < 0 is never true.
Fix this by casting sched_policy to int.

This issue was reported by coverity CID 1219934.

Fixes: dbdb2275 ("sched: Disallow sched_attr::sched_policy < 0")
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1401741514-7045-1-git-send-email-richard@nod.at


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent e9dd685c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment