From: Johannes Weiner <hannes@cmpxchg.org>
To: Odin Ugedal <odin@uged.al>
Cc: tj@kernel.org, lizefan@huawei.com, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org, dschatzberg@fb.com,
surenb@google.com
Subject: Re: [PATCH v2 1/2] cgroup: fix psi monitor for root cgroup
Date: Tue, 19 Jan 2021 11:52:37 -0500 [thread overview]
Message-ID: <YAcOVZ9hceK3gwWT@cmpxchg.org> (raw)
In-Reply-To: <20210116173634.1615875-2-odin@uged.al>
On Sat, Jan 16, 2021 at 06:36:33PM +0100, Odin Ugedal wrote:
> 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. 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>
Fixes: df5ba5be7425 ("kernel/sched/psi.c: expose pressure metrics on root cgroup")
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Since this is a userspace-triggerable NULL ptr crash, we should
probably also
Cc: stable@vger.kernel.org # 5.2+
next prev parent reply other threads:[~2021-01-19 18:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-16 17:36 [PATCH v2 0/2] cgroup: fix psi monitor for root cgroup Odin Ugedal
2021-01-16 17:36 ` [PATCH v2 1/2] " Odin Ugedal
2021-01-19 16:52 ` Johannes Weiner [this message]
2021-01-16 17:36 ` [PATCH v2 2/2] cgroup: update PSI file description in docs Odin Ugedal
2021-01-19 16:56 ` Johannes Weiner
2021-01-19 17:03 ` Tejun Heo
2021-01-19 16:46 ` [PATCH v2 0/2] cgroup: fix psi monitor for root cgroup Dan Schatzberg
2021-01-19 17:00 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YAcOVZ9hceK3gwWT@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=cgroups@vger.kernel.org \
--cc=dschatzberg@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=odin@uged.al \
--cc=surenb@google.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox