]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: mixart: Fix mutex deadlock
authorTakashi Iwai <tiwai@suse.de>
Thu, 19 Nov 2020 12:14:40 +0000 (13:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Nov 2020 12:39:08 +0000 (13:39 +0100)
commit62208748764e4603c54bb57269df84f133b1c412
tree15ce9e3a1e39c74da40cd81ce16938e20d6a45dc
parent0976f5c67a43d82f292c7c42cd09c5d99c20ab68
ALSA: mixart: Fix mutex deadlock

commit d21b96c8ed2aea7e6b7bf4735e1d2503cfbf4072 upstream.

The code change for switching to non-atomic mode brought the
unexpected mutex deadlock in get_msg().  It converted the spinlock
with the existing mutex, but there were calls with the already holding
the mutex.  Since the only place that needs the extra lock is the code
path from snd_mixart_send_msg(), remove the mutex lock in get_msg()
and apply in the caller side for fixing the mutex deadlock.

Fixes: 8d3a8b5cb57d ("ALSA: mixart: Use nonatomic PCM ops")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201119121440.18945-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/mixart/mixart_core.c