ALSA: usb-audio: Add spinlock to stop_urbs()
authorTakashi Iwai <tiwai@suse.de>
Wed, 29 Sep 2021 08:08:42 +0000 (10:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Dec 2021 08:04:36 +0000 (09:04 +0100)
commit7303160785e5c7c07c302a30142e0cf737b61b36
treeab44904310b00e8dbee1cae4d8f10453b7ed6669
parent31056232ad3cc37d3a0fef928f292e57ea055a59
ALSA: usb-audio: Add spinlock to stop_urbs()

commit 0ef74366bc150dda4f53c546dfa6e8f7c707e087 upstream.

In theory, stop_urbs() may be called concurrently.
Although we have the state check beforehand, it's safer to apply
ep->lock during the critical list head manipulations.

Link: https://lore.kernel.org/r/20210929080844.11583-8-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/usb/endpoint.c