From: sashiko-bot@kernel.org
To: "Guomin Chen" <guomin.chen@cixtech.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: cdns3: fix NULL dereference in cdns_host_resume()
Date: Wed, 18 Nov 2026 12:23:07 +0000 [thread overview]
Message-ID: <sashiko-outbox-220906@kernel.org> (raw)
In-Reply-To: <20261118120816.1974909-1-guomin.chen@cixtech.com>
> From: Guoming Chen <chenguoming88s@gmail.com>
>
> cdns_host_resume() assumes that the xhci-hcd child device is bound and
> passes platform_get_drvdata() straight to hcd_to_xhci_priv(). That is
> not guaranteed: __cdns_host_init() creates the child with
> platform_device_add(), but the child is only probed once xhci-plat
> registers. cdns3/ is linked before host/ in drivers/usb/Makefile and
> both are module_init(), so at boot the child stays unbound until
> xhci-plat's initcall runs; when xhci-plat is a module it stays unbound
> until the module is loaded, and it is retried even later when its probe
> returns -EPROBE_DEFER. Platforms that set
> CDNS3_DEFAULT_PM_RUNTIME_ALLOW (cdns3-imx is the only in-tree user) let
> the controller autosuspend (20 ms), so the parent may already be
> runtime-suspended by the time the child's probe actually runs.
>
> [ ... ]
> controller from scratch, and xhci_plat_priv.power_lost is only consumed
> when an already initialized host resumes.
>
> Fixes: 3a85c1011540 ("usb: host: cdns3: forward lost power information to xhci")
> Signed-off-by: Guoming Chen <chenguoming88s@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261118120816.1974909-1-guomin.chen@cixtech.com?part=1
prev parent reply other threads:[~2026-11-18 12:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 12:08 [PATCH] usb: cdns3: fix NULL dereference in cdns_host_resume() Guomin Chen
2026-11-18 12:23 ` 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-220906@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=guomin.chen@cixtech.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