public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Avichal Rakesh <arakesh@google.com>
To: Michael Grzeschik <mgr@pengutronix.de>
Cc: laurent.pinchart@ideasonboard.com, linux-usb@vger.kernel.org,
	linux-media@vger.kernel.org, dan.scally@ideasonboard.com,
	gregkh@linuxfoundation.org, nicolas@ndufresne.ca,
	kernel@pengutronix.de, Jayant Chowdhary <jchowdhary@google.com>
Subject: Re: [PATCH 2/3] usb: gadget: uvc: cleanup request when not in correct state
Date: Wed, 20 Sep 2023 13:15:20 -0700	[thread overview]
Message-ID: <c948cf51-7e1d-4bbc-b760-2cc8e850d801@google.com> (raw)
In-Reply-To: <ZQoPqLUfDBaO9VIh@pengutronix.de>



On 9/19/23 14:16, Michael Grzeschik wrote:
> On Tue, Sep 19, 2023 at 01:22:42PM -0700, Avichal Rakesh wrote:
>>
>>
>> On 9/19/23 13:07, Michael Grzeschik wrote:
>>> On Tue, Sep 19, 2023 at 12:55:02PM -0700, Avichal Rakesh wrote:
>>>> On 9/19/23 12:13, Michael Grzeschik wrote:
>>>>> On Mon, Sep 18, 2023 at 04:40:07PM -0700, Avichal Rakesh wrote:
>>>>>>
>>>>>>
>>>>>> On 9/18/23 14:43, Michael Grzeschik wrote:
>>>>>>> On Mon, Sep 18, 2023 at 12:02:11PM -0700, Avichal Rakesh wrote:
>>>>>>>> On 9/16/23 16:23, Michael Grzeschik wrote:
>>>>>>>>> On Fri, Sep 15, 2023 at 07:41:05PM -0700, Avichal Rakesh wrote:
>>>>>>>>>> On 9/15/23 16:32, Michael Grzeschik wrote:
>>>>>>>>>>> On Mon, Sep 11, 2023 at 09:52:22PM -0700, Avichal Rakesh wrote:
>>>>>>>>>>>> On 9/10/23 17:24, Michael Grzeschik wrote:
>>>>>>>>>>>>> The uvc_video_enable function of the uvc-gadget driver is dequeing and
>>>>>>>>>>>>> immediately deallocs all requests on its disable codepath. This is not
>>>>>>>>>>>>> save since the dequeue function is async and does not ensure that the
>>>>>>>>>>>>> requests are left unlinked in the controller driver.
>>>>>>>>>>>>>
>>>>>>>>>>>>> <snip>
>>
>> Agreed, uvc_video_free_requests should only free the requests in
>> req_free.
>>
>> Just to clear any confusion: are you working on incorporating these changes
>> into your patchset, or do you want me to include them in
>> https://lore.kernel.org/20230912041910.726442-3-arakesh@google.com/
>> instead?
> 
> As I am busy on a different topic at the moment, and you have suggested
> the main walkthrough for the solution, it would be great if you could
> come up with the proper patch.
> 
> But it would be great to find my Suggested-by in the patches. :)

Just sent out https://lore.kernel.org/20230920200335.63709-1-arakesh@google.com
with the changes discussed in this thread. The patch should work without
requiring any changes to dwc3. 

I didn't run into any crashes when testing the changes locally, but if you can,
I'd appreciate you testing the patches on your crash-prone setup as my setup's
crash rate was pretty low to begin with.

Thank you!

- Avi.



  reply	other threads:[~2023-09-20 20:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-11  0:24 [PATCH 0/3] usb: gadget: uvc: restart fixes Michael Grzeschik
2023-09-11  0:24 ` [PATCH 1/3] usb: gadget: uvc: stop pump thread on video disable Michael Grzeschik
2023-09-11  4:35   ` kernel test robot
2023-09-11  8:05   ` kernel test robot
2023-09-11  0:24 ` [PATCH 2/3] usb: gadget: uvc: cleanup request when not in correct state Michael Grzeschik
2023-09-12  4:52   ` Avichal Rakesh
2023-09-15 23:32     ` Michael Grzeschik
2023-09-16  2:41       ` Avichal Rakesh
2023-09-16 23:23         ` Michael Grzeschik
2023-09-18 19:02           ` Avichal Rakesh
2023-09-18 21:43             ` Michael Grzeschik
2023-09-18 23:40               ` Avichal Rakesh
2023-09-19  8:08                 ` Avichal Rakesh
2023-09-19 19:13                 ` Michael Grzeschik
2023-09-19 19:55                   ` Avichal Rakesh
2023-09-19 20:07                     ` Michael Grzeschik
2023-09-19 20:22                       ` Avichal Rakesh
2023-09-19 21:16                         ` Michael Grzeschik
2023-09-20 20:15                           ` Avichal Rakesh [this message]
2023-09-11  0:24 ` [PATCH 3/3] usb: gadget: uvc: rework pump worker to avoid while loop Michael Grzeschik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c948cf51-7e1d-4bbc-b760-2cc8e850d801@google.com \
    --to=arakesh@google.com \
    --cc=dan.scally@ideasonboard.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jchowdhary@google.com \
    --cc=kernel@pengutronix.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mgr@pengutronix.de \
    --cc=nicolas@ndufresne.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox