Linux USB
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: quic_wcheng@quicinc.com, hulianqin@vivo.com, selvarasu.g@samsung.com
Cc: <linux-usb@vger.kernel.org>,
	Mathias Nyman <mathias.nyman@linux.intel.com>
Subject: [[RFT PATCH v2] 0/2] xhci: sideband: fix use-after-free of stale virt device pointer
Date: Thu, 19 Nov 2026 23:48:38 +0200	[thread overview]
Message-ID: <20261119214841.1552318-1-mathias.nyman@linux.intel.com> (raw)

Hi

Second attempt.
These two patches attempt to improve the disappearing vdev issue
while sideband stays active.

I don't have real harware to test this on so all review comments and
feedback from testing is welcome.

There are still some gaps in how xhci driver uses locks when
disabling slots and freeing vdev that is not part of this series

changes since v1:

- add missing sideband_to_vdev() check to xhci_sideband_create_interrupter()
- fix ENOMEM return case in sideband_stop_endpoint_sync()
- always clear sb->eps[ep_index] when removing an endpoint.
- other minor changes

Thanks
Mathias


Mathias Nyman (2):
  xhci: sideband: avoid use-after-free of stale virt device pointer
  xhci: sideband: check virt device under xhci lock when stopping
    endpoints

 drivers/usb/host/xhci-sideband.c  | 151 ++++++++++++++++++++++--------
 drivers/usb/host/xhci.c           |  55 -----------
 drivers/usb/host/xhci.h           |   2 -
 include/linux/usb/xhci-sideband.h |   4 +-
 4 files changed, 113 insertions(+), 99 deletions(-)

-- 
2.43.0


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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 21:48 Mathias Nyman [this message]
2026-11-19 21:48 ` [[RFT PATCH v2] 1/2] xhci: sideband: avoid use-after-free of stale virt device pointer 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

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=20261119214841.1552318-1-mathias.nyman@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=hulianqin@vivo.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=quic_wcheng@quicinc.com \
    --cc=selvarasu.g@samsung.com \
    /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