usb: gadget: function: fix missing spinlock in f_uac1_legacy
authorZhang Qiang <qiang.zhang@windriver.com>
Mon, 6 Jul 2020 05:14:55 +0000 (13:14 +0800)
committerFelipe Balbi <balbi@kernel.org>
Thu, 9 Jul 2020 07:13:07 +0000 (10:13 +0300)
commit8778eb0927ddcd3f431805c37b78fa56481aeed9
tree85026f1a38e98e0fddd01c9146604bb451048434
parent30517ffeb3bff842e1355cbc32f1959d9dbb5414
usb: gadget: function: fix missing spinlock in f_uac1_legacy

Add a missing spinlock protection for play_queue, because
the play_queue may be destroyed when the "playback_work"
work func and "f_audio_out_ep_complete" callback func
operate this paly_queue at the same time.

Fixes: c6994e6f067cf ("USB: gadget: add USB Audio Gadget driver")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Zhang Qiang <qiang.zhang@windriver.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/gadget/function/f_uac1_legacy.c