From: Zhang Qiang <[email protected]>
Signed-off-by: Zhang Qiang <[email protected]>
---
drivers/usb/gadget/function/f_uac1_legacy.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/gadget/function/f_uac1_legacy.c b/drivers/usb/gadget/function/f_uac1_legacy.c
index 349deae7cabd..e2d7f69128a0 100644
--- a/drivers/usb/gadget/function/f_uac1_legacy.c
+++ b/drivers/usb/gadget/function/f_uac1_legacy.c
@@ -336,7 +336,9 @@ static int f_audio_out_ep_complete(struct usb_ep *ep, struct usb_request *req)
/* Copy buffer is full, add it to the play_queue */
if (audio_buf_size - copy_buf->actual < req->actual) {
+ spin_lock_irq(&audio->lock);
list_add_tail(©_buf->list, &audio->play_queue);
+ spin_unlock_irq(&audio->lock);
schedule_work(&audio->playback_work);
copy_buf = f_audio_buffer_alloc(audio_buf_size);
if (IS_ERR(copy_buf))
--
2.24.1
________________________________________
??????: [email protected] <[email protected]> ???? [email protected] <[email protected]>
????ʱ??: 2020??7??5?? 9:59
?ռ???: [email protected]
????: [email protected]; [email protected]; [email protected]; [email protected]
????: [PATCH] usb: gadget: function: fix missing spinlock in f_uac1_legacy
From: Zhang Qiang <[email protected]>
Signed-off-by: Zhang Qiang <[email protected]>
---
drivers/usb/gadget/function/f_uac1_legacy.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/gadget/function/f_uac1_legacy.c b/drivers/usb/gadget/function/f_uac1_legacy.c
index 349deae7cabd..e2d7f69128a0 100644
--- a/drivers/usb/gadget/function/f_uac1_legacy.c
+++ b/drivers/usb/gadget/function/f_uac1_legacy.c
@@ -336,7 +336,9 @@ static int f_audio_out_ep_complete(struct usb_ep *ep, struct usb_request *req)
/* Copy buffer is full, add it to the play_queue */
if (audio_buf_size - copy_buf->actual < req->actual) {
+ spin_lock_irq(&audio->lock);
list_add_tail(©_buf->list, &audio->play_queue);
+ spin_unlock_irq(&audio->lock);
schedule_work(&audio->playback_work);
copy_buf = f_audio_buffer_alloc(audio_buf_size);
if (IS_ERR(copy_buf))
--
2.24.1
On Sun, Jul 05, 2020 at 09:59:41AM +0800, [email protected] wrote:
> From: Zhang Qiang <[email protected]>
>
> Signed-off-by: Zhang Qiang <[email protected]>
No changelog text? I can't take patches like that, sorry.
greg k-h
Sorry, I will add changelog and resend.
Zhang Qiang
________________________________________
??????: Greg KH <[email protected]>
????ʱ??: 2020??7??6?? 15:40
?ռ???: Zhang, Qiang
????: [email protected]; [email protected]; [email protected]; [email protected]
????: Re: [PATCH] usb: gadget: function: fix missing spinlock in f_uac1_legacy
On Sun, Jul 05, 2020 at 09:59:41AM +0800, [email protected] wrote:
> From: Zhang Qiang <[email protected]>
>
> Signed-off-by: Zhang Qiang <[email protected]>
No changelog text? I can't take patches like that, sorry.
greg k-h