All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: raoxu <raoxu@uniontech.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: cdnsp: fix NULL pointer dereference during system resume
Date: Wed, 25 Nov 2026 08:12:05 +0000	[thread overview]
Message-ID: <sashiko-outbox-232870@kernel.org> (raw)
In-Reply-To: <7B818A718E70C344+20261125080021.3907332-1-raoxu@uniontech.com>

> From: Xu Rao <raoxu@uniontech.com>
> 
> cdnsp_gadget_suspend() now always disconnects the gadget and stops
> the controller, even when the link is already in U3. cdnsp_stop()
> disables the slot and clears active_port, but leaves the cached
> link_state unchanged.
> 
> If the controller retains its context across system suspend,
> cdnsp_gadget_resume() may call __cdnsp_gadget_wakeup() based on
> the stale U3 state. This dereferences active_port, which is NULL.
> Port-status event handling cannot restore active_port at this
> point because resume holds pdev->lock.
> 
> Remove the obsolete wakeup call from the resume path. The previous
> connection has already been torn down during suspend, and
> cdnsp_run() puts the enabled ports into RXDETECT. Let normal
> port-status event handling establish the new connection.
> 
> Fixes: eae6460f6173 ("usb: cdnsp: fix wakeup from S3 after controller context loss")
> Signed-off-by: Xu Rao <raoxu@uniontech.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/7B818A718E70C344+20261125080021.3907332-1-raoxu@uniontech.com?part=1

  reply	other threads:[~2026-11-25  8:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  8:00 [PATCH] usb: cdnsp: fix NULL pointer dereference during system resume raoxu
2026-11-25  8:12 ` sashiko-bot [this message]
2026-11-25  8:18 ` Wentao Guan

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-232870@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=raoxu@uniontech.com \
    --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.