From: sashiko-bot@kernel.org
To: "Guoming Chen" <chenguoming88s@gmail.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v5] usb: cdns3: fix NULL dereference in cdns_host_resume()
Date: Wed, 25 Nov 2026 09:11:40 +0000 [thread overview]
Message-ID: <sashiko-outbox-232975@kernel.org> (raw)
In-Reply-To: <20261125090115.2993-1-chenguoming88s@gmail.com>
> cdns_host_resume() dereferences the xhci-hcd child's drvdata without
> checking it, and both the child and its drvdata can be NULL:
>
> - cdns->host_dev: cdns_role_start() sets cdns->role before calling the
> role's start callback and keeps it on failure, so the next resume
> still calls cdns_host_resume() after a failed host start.
>
> - the child's drvdata: __cdns_host_init() creates the child, but
> xhci-plat sets the drvdata only in its probe. The parent is resumed
> before that, by __driver_probe_device() when the child is first
> probed and by a system resume in between.
>
> Commit 87e4b043b98a ("usb: cdns3: fix role switching during resume")
> only covers a role change during resume.
>
> [ ... ]
> xhci_plat_init+0x44/0x50
>
> Fixes: 3a85c1011540 ("usb: host: cdns3: forward lost power information to xhci")
> Cc: stable@vger.kernel.org
> Signed-off-by: Guoming Chen <chenguoming88s@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261125090115.2993-1-chenguoming88s@gmail.com?part=1
prev parent reply other threads:[~2026-11-25 9:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 4:43 [PATCH v3] usb: cdns3: fix NULL dereference in cdns_host_resume() Guomin chen
2026-11-23 4:56 ` sashiko-bot
2026-11-23 7:51 ` [PATCH v4] " Guomin chen
2026-11-23 8:05 ` sashiko-bot
2026-11-23 11:07 ` Théo Lebrun
2026-11-24 14:20 ` guoming chen
2026-11-25 9:01 ` [PATCH v5] " Guoming Chen
2026-11-25 9:11 ` sashiko-bot [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=sashiko-outbox-232975@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=chenguoming88s@gmail.com \
--cc=linux-usb@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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