mbox series

[0/5] ALSA: rawmidi: Make code robust for external calls

Message ID 20220617144051.18985-1-tiwai@suse.de
Headers show
Series ALSA: rawmidi: Make code robust for external calls | expand

Message

Takashi Iwai June 17, 2022, 2:40 p.m. UTC
Hi,

here is a small patch set for ALSA core rawmidi code to make the code
a bit more robust, especially for the case where the exported
functions get called from the external drivers.  Currently most of
those functions assume naively that they aren't called at a wrong
timing.  With the patch set, it tries to harden a bit not to hit
serious breakage.


Takashi

===

Takashi Iwai (5):
  ALSA: rawmidi: Make internal functions local static
  ALSA: rawmidi: Move lock to snd_rawmidi_substream
  ALSA: rawmidi: Take open_mutex around parameter changes
  ALSA: rawmidi: Check stream state at exported functions
  ALSA: rawmidi: Take buffer refcount while draining output

 include/sound/rawmidi.h |   6 +-
 sound/core/rawmidi.c    | 274 +++++++++++++++++++++++++---------------
 2 files changed, 170 insertions(+), 110 deletions(-)