From: Michal Pecio <michal.pecio@gmail.com>
To: Olli Salenius <opsalenius@gmail.com>
Cc: Mathias Nyman <mathias.nyman@linux.intel.com>,
linux-input@vger.kernel.org, bentiss@kernel.org,
jikos@kernel.org, linux-usb@vger.kernel.org, git@mayer-bgk.de,
"hadess@hadess.net" <hadess@hadess.net>,
"srimanachanta@gmail.com" <srimanachanta@gmail.com>,
"mathias.nyman@intel.com" <mathias.nyman@intel.com>
Subject: Re: [BUG] HID: steelseries-arctis: NULL deref in xhci_urb_enqueue from status timer during resume from suspend (Arctis 9) -> system hang
Date: Wed, 11 Nov 2026 12:10:18 +0100 [thread overview]
Message-ID: <20261111121018.49797328.michal.pecio@gmail.com> (raw)
In-Reply-To: <CACQx0bFrJYn60_QAogb23n0yiSy4hu5ZHQWXbRb_WBfS908tSQ@mail.gmail.com>
On Tue, 10 Nov 2026 22:46:27 +0200, Olli Salenius wrote:
> Disclaimer, I am not well versed kernel level stuff and using Claude
> Opus 5.5 in debugging this issue, so the following info may not be
> accurate, however the patch did seem to fix the hang at least on a few
> test suspend/resume -cycles.
Your LLM is right. The test patch makes no difference, but commit
555040535 removed the trigger. If you revert 555040535, the crash
will be back.
It happens because xhci_reset_or_discover_device() allocates new
state for the device, but it doesn't bother to update the root hub
pointer, leaving this job to xhci_setup_device().
To fix the crash we need either the dumb patch below or some rework
to preserve more state during resets. Probably the dumb fix is the
only viable short-term option.
It doesn't solve my problem #2, but that one is a race condition,
so much less likely to actually happen in practice.
Regards,
Michal
---
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index e5c8b3a945a6..81656bfdaf66 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1662,6 +1662,11 @@ static int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flag
goto free_priv;
}
+ if (!xhci->devs[slot_id]->rhub_port) {
+ ret = -EHOSTUNREACH;
+ goto free_priv;
+ }
if (xhci->devs[slot_id]->rhub_port->link_inactive) {
xhci_dbg(xhci, "Can't queue urb, port error, link inactive\n");
ret = -ENODEV;
prev parent reply other threads:[~2026-11-11 11:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CACQx0bG8+c9+CjLRa-tbgGkc5_4Wxhmanbd2vToo8Aj8k_WUYw@mail.gmail.com>
2026-11-08 7:35 ` Fwd: [BUG] HID: steelseries-arctis: NULL deref in xhci_urb_enqueue from status timer during resume from suspend (Arctis 9) -> system hang Olli Salenius
2026-11-10 8:34 ` Mathias Nyman
2026-11-10 9:57 ` Michal Pecio
2026-11-10 20:46 ` Olli Salenius
2026-11-11 11:10 ` Michal Pecio [this message]
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=20261111121018.49797328.michal.pecio@gmail.com \
--to=michal.pecio@gmail.com \
--cc=bentiss@kernel.org \
--cc=git@mayer-bgk.de \
--cc=hadess@hadess.net \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=mathias.nyman@linux.intel.com \
--cc=opsalenius@gmail.com \
--cc=srimanachanta@gmail.com \
/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