Hi,非常感谢给予这么多好的建议。但是这个补丁还不需要合入,如下说明:
commit 385aac1519417b89cb91b77c22e4ca21db563cd0
Author: Odin Ugedal <odin@uged.al>
Date: Sat Jan 16 18:36:33 2021 +0100
cgroup: fix psi monitor for root cgroup
Fix NULL pointer dereference when adding new psi monitor to the root
cgroup. PSI files for root cgroup was introduced in df5ba5be742 by using
system wide psi struct when reading, but file write/monitor was not
properly fixed.
对cgroup文件写的时候会触发NULL指针,而目前的patches没有合入cgroup文件的写和poll monitor的patch。
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 <odin@uged.al>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Acked-by: Dan Schatzberg <dschatzberg@fb.com>
Fixes: df5ba5be7425 ("kernel/sched/psi.c: expose pressure metrics on root cgroup")
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: stable@vger.kernel.org # 5.2+
Signed-off-by: Tejun Heo <tj@kernel.org>