]> Git Repo - linux.git/commit
sched/debug: Fix memory corruption caused by multiple small reads of flags
authorColin Ian King <[email protected]>
Thu, 29 Oct 2020 15:11:03 +0000 (15:11 +0000)
committerPeter Zijlstra <[email protected]>
Tue, 10 Nov 2020 17:38:49 +0000 (18:38 +0100)
commit8d4d9c7b4333abccb3bf310d76ef7ea2edb9828f
treee3a18d575d44955453501aa05b0dee98184162c5
parentb4c9c9f15649c98a5b45408919d1ff4fd7f5531c
sched/debug: Fix memory corruption caused by multiple small reads of flags

Reading /proc/sys/kernel/sched_domain/cpu*/domain0/flags mutliple times
with small reads causes oopses with slub corruption issues because the kfree is
free'ing an offset from a previous allocation. Fix this by adding in a new
pointer 'buf' for the allocation and kfree and use the temporary pointer tmp
to handle memory copies of the buf offsets.

Fixes: 5b9f8ff7b320 ("sched/debug: Output SD flag names rather than their values")
Reported-by: Jeff Bastian <[email protected]>
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Valentin Schneider <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
kernel/sched/debug.c
This page took 0.053043 seconds and 4 git commands to generate.