android_kernel_motorola_sm6375/kernel/cgroup
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Odin Ugedal 2407794f22 cgroup: fix psi monitor for root cgroup
commit 385aac1519417b89cb91b77c22e4ca21db563cd0 upstream.

Fix NULL pointer dereference when adding new psi monitor to the root
cgroup. PSI files for root cgroup was introduced in df5ba5be74 by using
system wide psi struct when reading, but file write/monitor was not
properly fixed. Since the PSI config for the root cgroup isn't
initialized, the current implementation tries to lock a NULL ptr,
resulting in a crash.

Can be triggered by running this as root:
$ tee /sys/fs/cgroup/cpu.pressure <<< "some 10000 1000000"

Signed-off-by: Odin Ugedal <[email protected]>
Reviewed-by: Suren Baghdasaryan <[email protected]>
Acked-by: Dan Schatzberg <[email protected]>
Fixes: df5ba5be74 ("kernel/sched/psi.c: expose pressure metrics on root cgroup")
Acked-by: Johannes Weiner <[email protected]>
Cc: [email protected] # 5.2+
Signed-off-by: Tejun Heo <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-02-17 10:35:14 +01:00
..
cgroup-internal.h
cgroup-v1.c cgroup: Fix memory leak when parsing multiple source parameters 2021-01-06 14:48:37 +01:00
cgroup.c cgroup: fix psi monitor for root cgroup 2021-02-17 10:35:14 +01:00
cpuset.c cpuset: fix race between hotplug work and later CPU offline 2020-12-30 11:51:36 +01:00
debug.c
freezer.c cgroup: freezer: don't change task and cgroups status unnecessarily 2019-12-31 16:45:06 +01:00
legacy_freezer.c
Makefile
namespace.c
pids.c cgroup: pids: use atomic64_t for pids->limit 2019-12-17 19:56:15 +01:00
rdma.c
rstat.c Revert "cgroup: Add memory barriers to plug cgroup_rstat_updated() race window" 2020-06-07 13:18:46 +02:00