mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Anfernee Cao <anferneemelokc5@gmail.com>,
	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>,
	Niklas Neronin <niklas.neronin@linux.intel.com>
Subject: Re: [PATCH] usb: xhci: fix EP0 context leak on virt device allocation failure
Date: Wed, 21 Oct 2026 11:38:12 +0300	[thread overview]
Message-ID: <ecc0265a-04e4-4ff8-9831-c5ef45a2b37c@linux.intel.com> (raw)
In-Reply-To: <6ad35dad.70c60f76.2e7ac9.12a4@mx.google.com>

On 10/17/26 14:36, Anfernee Cao wrote:
>> 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.

I'll pick up Xu Rao's patch. It got lost somehow

Thanks for the reminder
-Mathias

  reply	other threads:[~2026-10-21  8:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-17 11:11 Anfernee Cao
     [not found] ` <sashiko-outbox-175494@kernel.org>
2026-10-17 11:36   ` Anfernee Cao
2026-10-21  8:38     ` Mathias Nyman [this message]
2026-10-19 12:47 ` Neronin, Niklas
2026-10-20 15:52   ` Anfernee Cao

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=ecc0265a-04e4-4ff8-9831-c5ef45a2b37c@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=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=niklas.neronin@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®