diff options
author | Peter Zijlstra <peterz@infradead.org> | 2014-01-16 17:54:25 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-01-16 18:07:08 +0100 |
commit | eaad45132c564ce377e6dce05e78e08e456d5315 (patch) | |
tree | 5f61d9611cfeabfae68ad4bc22583a87524a4478 /kernel/futex.c | |
parent | 7479f3c9cf67edf5e8a76b21ea3726757f35cf53 (diff) | |
download | linux-eaad45132c564ce377e6dce05e78e08e456d5315.tar.gz linux-eaad45132c564ce377e6dce05e78e08e456d5315.tar.bz2 linux-eaad45132c564ce377e6dce05e78e08e456d5315.zip |
sched: Fix __sched_setscheduler() nice test
With the introduction of sched_attr::sched_nice we need to check
if we've got permission to actually change the nice value.
Daniel found that can_nice() would always fail; and upon
inspection it turns out that can_nice() only tests to see if we
can lower the nice value, but it doesn't validate if we're
lowering or not.
Therefore amend the test to only call can_nice() when we lower
the nice value.
Reported-and-Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: raistlin@linux.it
Cc: juri.lelli@gmail.com
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Fixes: d50dde5a10f3 ("sched: Add new scheduler syscalls to support an extended scheduling parameters ABI")
Link: http://lkml.kernel.org/r/20140116165425.GA9481@laptop.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/futex.c')
0 files changed, 0 insertions, 0 deletions