]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: mixart: Fix mutex deadlock
authorTakashi Iwai <tiwai@suse.de>
Thu, 19 Nov 2020 12:14:40 +0000 (13:14 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 19 Nov 2020 17:26:30 +0000 (18:26 +0100)
commitb4e14d67486717940846fb4eb5a066b101a0f6cc
treed63676bc314235e78d3f730fb990339348626a83
parent34f4b132884e7a1f842cab9b2ac74e6a2d3ccb8f
ALSA: mixart: Fix mutex deadlock

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: 661ee45c72c7 ("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>
sound/pci/mixart/mixart_core.c