This is a note to let you know that I've just added the patch titled
sched: Fix sched_policy < 0 comparison
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
sched-fix-sched_policy-0-comparison.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From b14ed2c273f8ab872ae4e6735fe5ab09cb14b8c3 Mon Sep 17 00:00:00 2001
From: Richard Weinberger <[email protected]>
Date: Mon, 2 Jun 2014 22:38:34 +0200
Subject: sched: Fix sched_policy < 0 comparison
From: Richard Weinberger <[email protected]>
commit b14ed2c273f8ab872ae4e6735fe5ab09cb14b8c3 upstream.
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: dbdb22754fde ("sched: Disallow sched_attr::sched_policy < 0")
Signed-off-by: Richard Weinberger <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Michael Kerrisk <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Cc: Dave Jones <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3707,7 +3707,7 @@ SYSCALL_DEFINE3(sched_setattr, pid_t, pi
if (retval)
return retval;
- if (attr.sched_policy < 0)
+ if ((int)attr.sched_policy < 0)
return -EINVAL;
rcu_read_lock();
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/sched-fix-sched_policy-0-comparison.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html