Skip to content

ALSA: rawmidi: Make code robust for external calls

Takashi Iwai alsa-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5ALSA: rawmidi: Make internal functions local staticinclude/sound/rawmidi.h sound/core/rawmidi.c+6 -110 replies
2/5ALSA: rawmidi: Move lock to snd_rawmidi_substreaminclude/sound/rawmidi.h sound/core/rawmidi.c+65 -680 replies
3/5ALSA: rawmidi: Take open_mutex around parameter changessound/core/rawmidi.c+25 -140 replies
4/5ALSA: rawmidi: Check stream state at exported functionssound/core/rawmidi.c+38 -180 replies
5/5ALSA: rawmidi: Take buffer refcount while draining outputsound/core/rawmidi.c+41 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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(-)
Signature · 1 line
2.35.3