From: Anfernee Cao <anferneemelokc5@gmail.com>
To: sashiko-reviews@lists.linux.dev
Cc: Mathias Nyman <mathias.nyman@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Xu Rao <raoxu@uniontech.com>
Subject: Re: [PATCH] usb: xhci: fix EP0 context leak on virt device allocation failure
Date: Sat, 17 Oct 2026 04:36:13 -0700 (PDT) [thread overview]
Message-ID: <6ad35dad.70c60f76.2e7ac9.12a4@mx.google.com> (raw)
In-Reply-To: <sashiko-outbox-175494@kernel.org>
> Does jumping to disable_slot here actually disable the newly enabled
> slot_id?
Yes, you're right, and thanks for catching it. The disable_slot label
should pass the local slot_id.
This is a pre-existing bug, separate from the EP0 context accounting
leak fixed by this patch, and it has already been submitted:
[PATCH] usb: xhci: disable the correct slot on alloc_dev failure
https://patchew.org/linux/6C94F1F35FF16E76+20260806084909.2959131-1-raoxu@uniontech.com/
Fixes: 3ffbba9511b4 ("USB: xhci: Allocate and address USB devices")
I deliberately kept this patch independent of that one. The decrement
added here releases the endpoint context reservation made by this
invocation, regardless of which slot the current error path ends up
disabling. Once Xu Rao's fix lands, the error path will disable the
correct slot and the two fixes compose cleanly.
If the maintainers prefer, I can resend this rebased on top of that fix
once it is applied, or send both as a series.
prev parent reply other threads:[~2026-10-17 11:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-17 11:11 [PATCH] usb: xhci: fix EP0 context leak on virt device allocation failure Anfernee Cao
2026-10-17 11:20 ` sashiko-bot
2026-10-17 11:36 ` Anfernee Cao [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=6ad35dad.70c60f76.2e7ac9.12a4@mx.google.com \
--to=anferneemelokc5@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--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.