diff options
author | Peter Zijlstra <peterz@infradead.org> | 2018-04-20 14:29:51 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-05-05 08:32:36 +0200 |
commit | 7281c8dec8a87685cb54d503d8cceef5a0fc2fdd (patch) | |
tree | d6297b366411ba9abe1dc8caa98f1d1fb91006ec /lib/bch.c | |
parent | b5bf9a90bbebffba888c9144c5a8a10317b04064 (diff) |
sched/core: Fix possible Spectre-v1 indexing for sched_prio_to_weight[]
> kernel/sched/core.c:6921 cpu_weight_nice_write_s64() warn: potential spectre issue 'sched_prio_to_weight'
Userspace controls @nice, so sanitize the value before using it to
index an array.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <stable@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib/bch.c')
0 files changed, 0 insertions, 0 deletions