]> git.baikalelectronics.ru Git - kernel.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)
committerTakashi Iwai <tiwai@suse.de>
Wed, 25 Apr 2018 08:37:45 +0000 (10:37 +0200)
commit0ebfa74aca90be8a7beffec5f063cb4842015bb7
treebfdc7a9bfc66c8711e52772e5762aed1efec9484
parent3200727c159891a103b4b38a4836e94c6b81fb0e
ALSA: seq: oss: Fix unbalanced use lock for synth MIDI device

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.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/seq/oss/seq_oss_synth.c