mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Wesley Cheng <wesley.cheng@oss.qualcomm.com>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Michal Pecio <michal.pecio@gmail.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-sound@vger.kernel.org
Subject: Re: [PATCH v6 0/4] Add larger page size support for USB audio offload path
Date: Tue, 17 Nov 2026 11:59:22 +0200	[thread overview]
Message-ID: <54beec96-2221-4109-ab7a-74502969b369@linux.intel.com> (raw)
In-Reply-To: <a38e874c-4685-4892-81b4-a6aeeaaeddb4@oss.qualcomm.com>

Hi

>>
> 
> Hi Mathias,
> 
> Was wondering if this design looked a bit more acceptable?  Was able to figure out a way to achieve what you had suggested earlier mitigating the dma free problem I mentioned in my previous email.  If there are any issues w/ this please let me know.
> 
> Thanks
> Wesley Cheng

Big picture looks good
I got stuck on the "no_pool_rings[EP_CTX_PER_DEV]" solution in [PATCH v6 2/4].

It reveals and reminds me of how poorly designed existing xhci_free_dev() is.

I tried to quickly fix that fist by 'unlinking' vdev from xhci->devs[]
inside the lock, preventing it from being dereferenced based on slot_id
somewhere else, and then free it without the lock.

I ended up with a huge mess that rewrites vdev free/allocation,
slot enable/disable, xhci_discover_or_reset_device() and xhci_resume().

Seems like best solution for now is to add "no_pool_rings[]" to support the
larger page size, and then later rework the vdev allocation/free and
slot enabling/disabling. I'll take a look at the details of the series.

I also have another sideband change attempting to fix the use-after-free
stale vdev pointer in sideband. It basically swaps vdev to udev.
I'll post it on the list. Let me know your thoughts on it.

Thanks
Mathias

      reply	other threads:[~2026-11-17  9:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  2:38 Wesley Cheng
2026-11-10  2:38 ` [PATCH v6 1/4] usb: xhci: sideband: fix ring sg table for sub-page TRB segments Wesley Cheng
2026-11-10  2:38 ` [PATCH v6 2/4] usb: xhci: Allocate sideband ring segments with dma_alloc_coherent() Wesley Cheng
2026-11-10  2:38 ` [PATCH v6 3/4] ALSA: usb-audio: qcom: tag sideband endpoints before ring allocation Wesley Cheng
2026-11-10  2:38 ` [PATCH v6 4/4] ALSA: usb-audio: qcom: fix xfer ring IOMMU unmap on 16K+ page kernels Wesley Cheng
2026-11-17  8:19 ` [PATCH v6 0/4] Add larger page size support for USB audio offload path Wesley Cheng
2026-11-17  9:59   ` Mathias Nyman [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=54beec96-2221-4109-ab7a-74502969b369@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=michal.pecio@gmail.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=wesley.cheng@oss.qualcomm.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

all inboxes | Powered by JetHome®