All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Guomin chen" <chenguoming88s@gmail.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v4] usb: cdns3: fix NULL dereference in cdns_host_resume()
Date: Mon, 23 Nov 2026 08:05:10 +0000	[thread overview]
Message-ID: <sashiko-outbox-228874@kernel.org> (raw)
In-Reply-To: <20261123075116.3868-1-chenguoming88s@gmail.com>

> From: Guoming Chen <chenguoming88s@gmail.com>
> 
> cdns_host_resume() assumes that the xhci-hcd child is bound and passes
> platform_get_drvdata() to hcd_to_xhci_priv() unchecked.  The child is
> created by __cdns_host_init(), but xhci-plat probes it only when it
> registers; cdns3/ precedes host/ in drivers/usb/Makefile, so with both
> built in the child is registered before xhci-plat's initcall runs, and
> with xhci-plat as a module it stays unbound until the module loads.
> Platforms that allow runtime PM (cdns3-imx is the only in-tree user)
> autosuspend the controller after 20 ms, so the parent may already be
> suspended when the child is probed.
> 
> Resuming the parent, either for the child's probe
> (__driver_probe_device() calls pm_runtime_get_sync(dev->parent)) or on
> a system-wide resume, runs cdns_host_resume() while the drvdata is
> [ ... ]
> resume would dereference freed memory instead of bailing out.
> 
> 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/20261123075116.3868-1-chenguoming88s@gmail.com?part=1

  reply	other threads:[~2026-11-23  8:05 UTC|newest]

Thread overview: 9+ 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 [this message]
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
2026-11-25 10:20     ` Théo Lebrun

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-228874@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.