sched/core: Fix buffer overflow in cgroup2 property cpu.max
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Wed, 6 Mar 2019 17:11:42 +0000 (20:11 +0300)
committerIngo Molnar <mingo@kernel.org>
Tue, 19 Mar 2019 11:06:15 +0000 (12:06 +0100)
commit4c47acd824aaaa8fc6dc519fb4e08d1522105b7a
tree96f595cbd974d9ac218a232961a1a62c637c1eee
parenta23314e9d88d89d49e69db08f60b7caa470f04e1
sched/core: Fix buffer overflow in cgroup2 property cpu.max

Add limit into sscanf format string for on-stack buffer.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 0d5936344f30 ("sched: Implement interface for cgroup unified hierarchy")
Link: https://lkml.kernel.org/r/155189230232.2620.13120481613524200065.stgit@buzz
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c