]> 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:05:52 +0000 (13:05 +0100)
commite5f40705d1157def359dd76c9dc4bc96318b96b1
treee137e729248eb5a2e241227c316f3ae2051a4866
parente35e86812a7e35c1320fc51c45565f61478dd045
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