This is a note to let you know that I've just added the patch titled
sched: Disallow sched_attr::sched_policy < 0
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-disallow-sched_attr-sched_policy-0.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 dbdb22754fde671dc93d2fae06f8be113d47f2fb Mon Sep 17 00:00:00 2001
From: Peter Zijlstra <[email protected]>
Date: Fri, 9 May 2014 10:49:03 +0200
Subject: sched: Disallow sched_attr::sched_policy < 0
From: Peter Zijlstra <[email protected]>
commit dbdb22754fde671dc93d2fae06f8be113d47f2fb upstream.
The scheduler uses policy=-1 to preserve the current policy state to
implement sys_sched_setparam(), this got exposed to userspace by
accident through sys_sched_setattr(), cure this.
Reported-by: Michael Kerrisk <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Acked-by: Michael Kerrisk <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link:
http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
kernel/sched/core.c | 3 +++
1 file changed, 3 insertions(+)
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3683,6 +3683,9 @@ SYSCALL_DEFINE3(sched_setattr, pid_t, pi
if (sched_copy_attr(uattr, &attr))
return -EFAULT;
+ if (attr.sched_policy < 0)
+ return -EINVAL;
+
rcu_read_lock();
retval = -ESRCH;
p = find_process_by_pid(pid);
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/sched-deadline-fix-memory-leak.patch
queue-3.14/sched-use-cpupri_nr_priorities-instead-of-max_rt_prio-in-cpupri-check.patch
queue-3.14/perf-prevent-false-warning-in-perf_swevent_add.patch
queue-3.14/perf-fix-race-in-removing-an-event.patch
queue-3.14/sched-make-sched_setattr-correctly-return-efbig.patch
queue-3.14/perf-limit-perf_event_attr-sample_period-to-63-bits.patch
queue-3.14/sched-disallow-sched_attr-sched_policy-0.patch
queue-3.14/sched-sanitize-irq-accounting-madness.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