All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ALSA: hdsp, hdspm: Fix unlocked control_register updates in MIDI paths
@ 2026-11-06 20:50 Yifei Gao
  2026-11-06 20:50 ` [PATCH 1/2] ALSA: hdsp: Serialize control_register updates in MIDI input paths Yifei Gao
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yifei Gao @ 2026-11-06 20:50 UTC (permalink / raw)
  To: tiwai, perex; +Cc: linux-sound, linux-kernel, Yifei Gao

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-07  9:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-06 20:50 [PATCH 0/2] ALSA: hdsp, hdspm: Fix unlocked control_register updates in MIDI paths Yifei Gao
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
2026-11-07  9:11 ` [PATCH 0/2] ALSA: hdsp, hdspm: Fix unlocked control_register updates in MIDI paths Takashi Iwai

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.