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: Thu, 19 Nov 2026 17:26:47 +0200	[thread overview]
Message-ID: <026c4fd4-cae7-41e6-88e7-be8387031eb7@linux.intel.com> (raw)
In-Reply-To: <82a57df7-a3c5-4986-a724-44f00b22a532@oss.qualcomm.com>

On 11/19/26 00:30, Wesley Cheng wrote:
> 
> 
> On 11/17/2026 1:59 AM, Mathias Nyman wrote:
>> 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.
>>
> Sure, I assume you're talking about:
> https://lore.kernel.org/all/20261118125109.1429538-1-mathias.nyman@linux.intel.com/
> 
> If so, let me look it over, pull it into my branch and test it out if it looks good.  I wasn't able to reliably reproduce the issue that Lianqin initially reported, so I'll see if I can figure out a way to exercise that call path.
> 

Yes, but sashiko found one missing sideband_to_vdev(sb) check that would be good to fix.
Rest of warnings were expected.

I'll fix it, and clean up some other minor things, and send a v2

Thanks
Mathias


      reply	other threads:[~2026-11-19 15:26 UTC|newest]

Thread overview: 9+ 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
2026-11-18 22:30     ` Wesley Cheng
2026-11-19 15:26       ` 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=026c4fd4-cae7-41e6-88e7-be8387031eb7@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®