From: bugzilla-daemon@kernel.org
To: linux-usb@vger.kernel.org
Subject: [Bug 220272] Latent race condition in USB code unveiled with optimized memset_64.S
Date: Mon, 30 Jun 2025 14:26:45 +0000 [thread overview]
Message-ID: <bug-220272-208809-1q59UE57VH@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-220272-208809@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=220272
--- Comment #18 from Marcus Seyfarth (m.seyfarth@gmail.com) ---
(In reply to Michał Pecio from comment #16)
> What if you disable and re-enable the whole USB bus?
> Based on your logs, this should do it:
>
> echo 0000:00:14.0 > /sys/bus/pci/drivers/xhci_hcd/unbind
> echo 0000:00:14.0 > /sys/bus/pci/drivers/xhci_hcd/bind
>
> Note that if you have a keyboard on this bus it will stop working. You may
> want to issue both commands at once: "echo xxxx ; echo yyyy".
I've just tested this and to my surprise, the mouse remained in a non-working
state. The keyboard turned off and on again and was usable before and after.
(In reply to Michał Pecio from comment #17)
> I also had a look at this LLM generated "report" and I can't see how the
> alleged issues are supposed to be real.
>
> 1. Replacing wmb() with dma_wmb() possibly makes sense, though on x86 wmb()
> is stronger than dma_wmb() so it can't be the cause of your problem. Other
> PCI drivers made such change for performance rather than correctness.
>
> 2. I'm not familiar with xhci->mutex use so no comment, but the alleged
> deadlock probably doesn't exist as there is no asynchronous completion
> callback here.
>
> 3. Pedantry with no functional impact.
>
> 4. The driver will abort a hanging command and signal the completion.
>
> 5. We immediately return so we don't go to the out label. No bug.
>
> 6. mutex != spinlock. No bug.
>
> 7. I see no bug. No static analyzer was run so that part is made up.
>
> 8. Doesn't matter if the value is zero.
>
> 9. No arithmetic is done on this variable.
Thanks a lot for taking a look, even if only #1 ends up being worth of
consideration.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next prev parent reply other threads:[~2025-06-30 14:26 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 11:39 [Bug 220272] New: Latent race condition in USB code unveiled with optimized memset_64.S bugzilla-daemon
2025-06-26 14:04 ` Greg KH
2025-06-26 14:05 ` [Bug 220272] " bugzilla-daemon
2025-06-26 14:30 ` bugzilla-daemon
2025-06-26 16:02 ` bugzilla-daemon
2025-06-26 16:20 ` bugzilla-daemon
2025-06-26 16:51 ` bugzilla-daemon
2025-06-26 16:53 ` bugzilla-daemon
2025-06-27 8:28 ` bugzilla-daemon
2025-06-27 9:17 ` bugzilla-daemon
2025-06-27 15:52 ` bugzilla-daemon
2025-06-27 16:08 ` bugzilla-daemon
2025-06-27 17:36 ` bugzilla-daemon
2025-06-28 7:22 ` bugzilla-daemon
2025-06-28 16:11 ` bugzilla-daemon
2025-06-28 17:26 ` bugzilla-daemon
2025-06-29 14:19 ` bugzilla-daemon
2025-06-30 8:57 ` bugzilla-daemon
2025-06-30 9:17 ` bugzilla-daemon
2025-06-30 14:26 ` bugzilla-daemon [this message]
2025-06-30 14:35 ` bugzilla-daemon
2025-06-30 16:51 ` bugzilla-daemon
2025-06-30 18:38 ` bugzilla-daemon
2025-06-30 19:22 ` bugzilla-daemon
2025-07-01 17:50 ` bugzilla-daemon
2025-07-02 5:48 ` bugzilla-daemon
2025-07-02 6:02 ` bugzilla-daemon
2025-07-02 8:06 ` bugzilla-daemon
2025-07-02 14:12 ` bugzilla-daemon
2025-07-02 17:20 ` bugzilla-daemon
2025-07-02 17:38 ` bugzilla-daemon
2025-07-10 20:46 ` 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-220272-208809-1q59UE57VH@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox