Linux USB
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mathias Nyman" <mathias.nyman@linux.intel.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [[RFT PATCH v2] 2/2] xhci: sideband: check virt device under xhci lock when stopping endpoints
Date: Thu, 19 Nov 2026 21:54:05 +0000	[thread overview]
Message-ID: <sashiko-outbox-224112@kernel.org> (raw)
In-Reply-To: <20261119214841.1552318-3-mathias.nyman@linux.intel.com>

> Start work to protect sideband API functions against the xhci driver
> freeing or reallocating the virt device (vdev) in the middle of an API
> call.
> 
> Make the following sideband API calls hold xhci->lock while validating
> the vdev and its endpoint, and while queueing the stop endpoint command:
> 
> xhci_sideband_unregister()
> xhci_sideband_stop_endpoint()
> xhci_sideband_remove_endpoint()
> 
> Locking changes are still needed in several xhci 'core' driver vdev free
> paths before the above calls are fully serialized against vdev free.
> Cases involve xHC reset in resume, enumeration retry, and reset-resume.
> 
> Move the stop endpoint code from xhci_stop_endpoint_sync() in xhci.c to
> a new sideband_stop_endpoint_sync() helper in xhci-sideband.c.
> 
> xhci_stop_endpoint_sync() has no other users, so remove it.
> 
> Also take sb->mutex in xhci_sideband_stop_endpoint(), and keep holding
> it in xhci_sideband_unregister() until the sideband is detached from the
> vdev.
> 
> Fixes: de66754e9f80 ("xhci: sideband: add initial api to register a secondary interrupter entity")
> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261119214841.1552318-1-mathias.nyman@linux.intel.com?part=2


      reply	other threads:[~2026-11-19 21:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 21:48 [[RFT PATCH v2] 0/2] xhci: sideband: fix use-after-free of stale virt device pointer Mathias Nyman
2026-11-19 21:48 ` [[RFT PATCH v2] 1/2] xhci: sideband: avoid " Mathias Nyman
2026-11-19 21:53   ` sashiko-bot
2026-11-19 21:48 ` [[RFT PATCH v2] 2/2] xhci: sideband: check virt device under xhci lock when stopping endpoints Mathias Nyman
2026-11-19 21:54   ` 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-224112@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox