From: Waiman Long <llong@redhat.com>
To: Kamaljit Singh <Kamaljit.Singh1@wdc.com>,
"cgroups@vger.kernel.org" <cgroups@vger.kernel.org>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: cgroup null pointer dereference
Date: Wed, 23 Apr 2025 17:26:04 -0400 [thread overview]
Message-ID: <a5eac08e-bdb4-4aa2-bb46-aa89b6eb1871@redhat.com> (raw)
In-Reply-To: <BY5PR04MB68495E9E8A46CA9614D62669BCBB2@BY5PR04MB6849.namprd04.prod.outlook.com>
On 4/23/25 1:30 PM, Kamaljit Singh wrote:
> Hello,
>
> While running IOs to an nvme fabrics target we're hitting this null pointer which causes
> CPU hard lockups and NMI. Before the lockups, the Medusa IOs ran successfully for ~23 hours.
>
> I did not find any panics listing nvme or block driver calls.
>
> RIP: 0010:cgroup_rstat_flush+0x1d0/0x750
> points to rstat.c, cgroup_rstat_push_children(), line 162 under second while() to the following code.
>
> 160 /* updated_next is parent cgroup terminated */
> 161 while (child != parent) {
> 162 child->rstat_flush_next = head;
> 163 head = child;
> 164 crstatc = cgroup_rstat_cpu(child, cpu);
> 165 grandchild = crstatc->updated_children;
>
> In my test env I've added a null check to 'child' and re-running the long-term test.
> I'm wondering if this patch is sufficient to address any underlying issue or is just a band-aid.
> Please share any known patches or suggestions.
> - while (child != parent) {
> + while (child && child != parent) {
Child can become NULL only if the updated_next list isn't parent
terminated. This should not happen. A warning is needed if it really
happens. I will take a further look to see if there is a bug somewhere.
Cheers,
Longman
next prev parent reply other threads:[~2025-04-23 21:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 17:30 cgroup null pointer dereference Kamaljit Singh
2025-04-23 21:26 ` Waiman Long [this message]
2025-04-25 0:53 ` Kamaljit Singh
2025-04-25 1:33 ` Waiman Long
2025-04-25 1:43 ` Waiman Long
2025-04-25 1:49 ` Waiman Long
2025-04-25 2:22 ` Kamaljit Singh
2025-04-25 14:54 ` hch
2025-04-25 15:04 ` Waiman Long
2025-04-25 15:11 ` hch
2025-04-25 15:22 ` Waiman Long
2025-04-25 15:26 ` hch
2025-04-25 17:20 ` Kamaljit Singh
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=a5eac08e-bdb4-4aa2-bb46-aa89b6eb1871@redhat.com \
--to=llong@redhat.com \
--cc=Kamaljit.Singh1@wdc.com \
--cc=cgroups@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.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