From: sashiko-bot@kernel.org
To: "Mathias Nyman" <mathias.nyman@linux.intel.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH 2/5] usb: xhci: disable the correct slot on alloc_dev failure
Date: Thu, 05 Nov 2026 18:06:32 +0000 [thread overview]
Message-ID: <sashiko-outbox-199689@kernel.org> (raw)
In-Reply-To: <20261105175106.241182-3-mathias.nyman@linux.intel.com>
> From: Xu Rao <raoxu@uniontech.com>
>
> xhci_alloc_dev() stores the Slot ID returned by the Enable Slot command
> in the local slot_id variable. udev->slot_id is updated only after
> xhci_alloc_virt_device() succeeds.
>
> If endpoint resource reservation or virtual device allocation fails
> before that update, the error path passes udev->slot_id to
> xhci_disable_and_free_slot(). During initial enumeration this is slot 0.
> When reallocating a device whose virtual device is missing or belongs to
> another usb_device, udev->slot_id may contain a stale Slot ID.
> The newly enabled slot can therefore remain active, or the wrong slot can
> be disabled.
>
> Pass slot_id, which identifies the slot enabled by this invocation.
> xhci_disable_and_free_slot() already handles a missing xhci->devs entry.
>
> Fixes: 3ffbba9511b4 ("USB: xhci: Allocate and address USB devices")
> Cc: stable@vger.kernel.org
> Signed-off-by: Xu Rao <raoxu@uniontech.com>
> Reviewed-by: Niklas Neronin <niklas.neronin@linux.intel.com>
> 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/20261105175106.241182-1-mathias.nyman@linux.intel.com?part=2
next prev parent reply other threads:[~2026-11-05 18:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 17:51 [PATCH 0/5] xhci fixes for usb-linus Mathias Nyman
2026-11-05 17:51 ` [PATCH 1/5] xhci: keep port link_inactive and connected flags in sync when polled Mathias Nyman
2026-11-05 17:56 ` sashiko-bot
2026-11-05 17:51 ` [PATCH 2/5] usb: xhci: disable the correct slot on alloc_dev failure Mathias Nyman
2026-11-05 18:06 ` sashiko-bot [this message]
2026-11-05 17:51 ` [PATCH 3/5] usb: pci-quirks: always assert xHCI OS ownership Mathias Nyman
2026-11-05 17:54 ` sashiko-bot
2026-11-05 17:51 ` [PATCH 4/5] usb: xhci: clear stale bandwidth data after hibernation Mathias Nyman
2026-11-05 17:56 ` sashiko-bot
2026-11-05 17:51 ` [PATCH 5/5] usb: xhci: fix 'num_active_eps' accounting on allocation failure Mathias Nyman
2026-11-05 17:55 ` 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=sashiko-outbox-199689@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