]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:24:05 +0000 (12:24 +0200)
commit6352fb96f76874e090b55b960da4e5d0c27563d8
treed7917fa5011ca3e485cb6b3e7874a5314a7a9fbe
parentdd1763201b0822a26a129028144b0802f3a56146
ALSA: seq: oss: Fix unbalanced use lock for synth MIDI device

BugLink: http://bugs.launchpad.net/bugs/1778265
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.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
sound/core/seq/oss/seq_oss_synth.c