From: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
To: Odin Ugedal <odin-RObV4cXtwVA@public.gmane.org>
Cc: tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dschatzberg-b10kYP2dOMg@public.gmane.org,
surenb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org
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-RObV4cXtwVA@public.gmane.org>
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-RObV4cXtwVA@public.gmane.org>
> Reviewed-by: Suren Baghdasaryan <surenb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Fixes: df5ba5be7425 ("kernel/sched/psi.c: expose pressure metrics on root cgroup")
Acked-by: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
Since this is a userspace-triggerable NULL ptr crash, we should
probably also
Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org # 5.2+
next prev parent reply other threads:[~2021-01-19 16:52 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
[not found] ` <20210116173634.1615875-1-odin-RObV4cXtwVA@public.gmane.org>
2021-01-16 17:36 ` [PATCH v2 1/2] " Odin Ugedal
[not found] ` <20210116173634.1615875-2-odin-RObV4cXtwVA@public.gmane.org>
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-druugvl0lcnafugrpc6u6w@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dschatzberg-b10kYP2dOMg@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=odin-RObV4cXtwVA@public.gmane.org \
--cc=surenb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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