All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: linux-usb@vger.kernel.org
Subject: [Bug 215740] kernel warning: DMA-API: xhci_hcd: cacheline tracking EEXIST, overlapping mappings aren't supported
Date: Thu, 26 Mar 2026 19:46:32 +0000	[thread overview]
Message-ID: <bug-215740-208809-diamE8VkAv@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-215740-208809@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=215740

Mikhail (mikhail.v.gavrilov@gmail.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikhail.v.gavrilov@gmail.co
                   |                            |m

--- Comment #51 from Mikhail (mikhail.v.gavrilov@gmail.com) ---
Created attachment 309769
  --> https://bugzilla.kernel.org/attachment.cgi?id=309769&action=edit
dma_cacheline_eexist_repro.mod.c

I hit this exact warning on 7.0-rc5 with an ASUS USB Audio device
(0b05:1a5c) on AMD B650E (ROG STRIX B650E-I) + xhci_hcd 0000:0c:00.0.
Same stack trace through snd_usb_ctl_msg -> usb_control_msg ->
usb_hcd_map_urb_for_dma -> dma_map_phys -> add_dma_entry -> EEXIST.

I tested Guenter's patch from comment #43 (ARCH_KMALLOC_MINALIGN =
L1_CACHE_BYTES when CONFIG_DMA_API_DEBUG) and can confirm it fixes
the issue.

I also wrote a kernel module reproducer that triggers the bug reliably
on demand, without needing to wait for a specific USB device to be
plugged in during boot. The module does exactly what hub_configure()
does: two kmalloc(8) allocations back-to-back, then DMA-maps both.
On x86_64 with ARCH_KMALLOC_MINALIGN=8, they land in the same
64-byte cacheline within ~50 attempts, triggering the EEXIST warning.

Before fix:
  dma_repro: pair 53: buf_a=ffff8881c8f9eb80 buf_b=ffff8881c8f9eba0
             -- SAME cacheline 119793582!
  DMA-API: cacheline tracking EEXIST, overlapping mappings aren't
           supported

After fix (ARCH_KMALLOC_MINALIGN >= L1_CACHE_BYTES):
  dma_repro: no same-cacheline pair found in 64 attempts
             (ARCH_KMALLOC_MINALIGN may already be >= cache_line_size)

I can submit a formal patch based on Guenter's fix if nobody objects.

Reproducer module source attached.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

  parent reply	other threads:[~2026-03-26 19:46 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 15:18 [Bug 215740] New: kernel warning: DMA-API: xhci_hcd: cacheline tracking EEXIST, overlapping mappings aren't supported bugzilla-daemon
2022-03-31  6:52 ` [Bug 215740] " bugzilla-daemon
2022-03-31  6:54 ` bugzilla-daemon
2022-03-31  7:41 ` [Bug 215740] New: " Thorsten Leemhuis
2022-04-05  5:19   ` Christoph Hellwig
2022-04-11 10:21   ` [Bug 215740] New: kernel warning: DMA-API: xhci_hcd: cacheline tracking EEXIST, overlapping mappings aren't supported #forregzbot Thorsten Leemhuis
2022-03-31  7:41 ` [Bug 215740] kernel warning: DMA-API: xhci_hcd: cacheline tracking EEXIST, overlapping mappings aren't supported bugzilla-daemon
2022-03-31  7:54 ` bugzilla-daemon
2022-04-05  5:19 ` bugzilla-daemon
2022-05-04  8:10 ` bugzilla-daemon
2022-05-04 10:17 ` bugzilla-daemon
2023-10-10 20:19 ` bugzilla-daemon
2023-11-12 20:46 ` bugzilla-daemon
2023-11-13 22:11 ` bugzilla-daemon
2023-11-14  3:25 ` bugzilla-daemon
2023-11-15 20:24 ` bugzilla-daemon
2023-11-16  2:19 ` bugzilla-daemon
2023-11-17 22:13 ` bugzilla-daemon
2023-11-19 16:47 ` bugzilla-daemon
2023-11-19 21:12 ` bugzilla-daemon
2023-11-20 19:43 ` bugzilla-daemon
2023-11-21 19:31 ` bugzilla-daemon
2023-11-21 20:51 ` bugzilla-daemon
2023-11-23 21:27 ` bugzilla-daemon
2023-11-24 12:02 ` bugzilla-daemon
2023-11-24 12:07 ` bugzilla-daemon
2023-11-24 15:27 ` bugzilla-daemon
2023-11-24 15:30 ` bugzilla-daemon
2023-11-24 15:40 ` bugzilla-daemon
2023-11-24 15:50 ` bugzilla-daemon
2023-11-24 16:09 ` bugzilla-daemon
2023-11-24 16:21 ` bugzilla-daemon
2023-11-24 21:05 ` bugzilla-daemon
2023-11-24 22:22 ` bugzilla-daemon
2023-11-25  2:03 ` bugzilla-daemon
2023-11-25 20:50 ` bugzilla-daemon
2023-11-25 21:17 ` bugzilla-daemon
2023-11-25 22:15 ` bugzilla-daemon
2023-11-28 19:04 ` bugzilla-daemon
2023-11-28 21:28 ` bugzilla-daemon
2023-11-29 15:44 ` bugzilla-daemon
2023-11-30 19:35 ` bugzilla-daemon
2024-09-24 16:50 ` bugzilla-daemon
2024-09-24 16:56 ` bugzilla-daemon
2025-06-03  4:08 ` bugzilla-daemon
2025-06-03 14:28 ` bugzilla-daemon
2025-06-03 18:31 ` bugzilla-daemon
2025-06-03 19:09 ` bugzilla-daemon
2026-01-22  4:53 ` bugzilla-daemon
2026-01-22  7:27 ` bugzilla-daemon
2026-01-22 19:38 ` bugzilla-daemon
2026-03-17 14:52 ` bugzilla-daemon
2026-03-17 16:18 ` bugzilla-daemon
2026-03-17 17:51 ` bugzilla-daemon
2026-03-26 19:46 ` bugzilla-daemon [this message]
2026-03-27  0:04 ` bugzilla-daemon
2026-03-27  7:32 ` bugzilla-daemon

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=bug-215740-208809-diamE8VkAv@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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.