From: Yifei Gao <gyf161023@gmail.com>
To: tiwai@suse.com, perex@perex.cz
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
Yifei Gao <gyf161023@gmail.com>
Subject: [PATCH 0/2] ALSA: hdsp, hdspm: Fix unlocked control_register updates in MIDI paths
Date: Fri, 6 Nov 2026 20:50:45 +0000 [thread overview]
Message-ID: <20261106205050.8048-1-gyf161023@gmail.com> (raw)
hdsp and hdspm keep a software copy of the card's control register and
update it read-modify-write under the card lock, except in some MIDI
input paths, where concurrent updates can be lost.
In 2011, commit c0da00145f9a ("ALSA: hdspm - Fix locking in
snd_hdspm_midi_input_read") fixed the MIDI work side in hdspm. The
interrupt handler side was left unlocked, and hdsp has both problems.
Patch 1 fixes hdsp. Patch 2 fixes the remaining interrupt handler side
in hdspm.
Both issues were found by static analysis. The patches are
compile-tested only (W=1). I have no access to this hardware, so tests
on a real card would be very welcome.
Yifei Gao (2):
ALSA: hdsp: Serialize control_register updates in MIDI input paths
ALSA: hdspm: Take hdspm->lock when masking MIDI interrupts in IRQ
handler
sound/pci/rme9652/hdsp.c | 16 ++++++++++++----
sound/pci/rme9652/hdspm.c | 8 +++++---
2 files changed, 17 insertions(+), 7 deletions(-)
--
2.34.1
next reply other threads:[~2026-11-06 20:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 20:50 Yifei Gao [this message]
2026-11-06 20:50 ` [PATCH 1/2] ALSA: hdsp: Serialize control_register updates in MIDI input paths Yifei Gao
2026-11-06 20:50 ` [PATCH 2/2] ALSA: hdspm: Take hdspm->lock when masking MIDI interrupts in IRQ handler Yifei Gao
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=20261106205050.8048-1-gyf161023@gmail.com \
--to=gyf161023@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.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®