]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: seq: oss: Fix unbalanced use lock for synth MIDI device
authorTakashi Iwai <tiwai@suse.de>
Tue, 24 Apr 2018 05:26:59 +0000 (07:26 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 21 Oct 2018 07:45:42 +0000 (08:45 +0100)
commit7e79f31fe781125ca370091d5aafb3abb222f8b8
tree448876be198acbc31ce004b5d5b8b211b804b51c
parent9fbd4f88fbb01577fda99ed8307480e78a38be58
ALSA: seq: oss: Fix unbalanced use lock for synth MIDI device

commit f5e94b4c6ebdabe0f602d796e0430180927521a0 upstream.

When get_synthdev() is called for a MIDI device, it returns the fixed
midi_synth_dev without the use refcounting.  OTOH, the caller is
supposed to unreference unconditionally after the usage, so this would
lead to unbalanced refcount.

This patch corrects the behavior and keep up the refcount balance also
for the MIDI synth device.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
sound/core/seq/oss/seq_oss_synth.c