linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Sakari Ailus <sakari.ailus@iki.fi>,
	linux-uvc-devel@lists.sourceforge.net, linux-usb@vger.kernel.org,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/5] media: uvcvideo: Fix race conditions
Date: Wed, 2 Sep 2020 20:19:07 -0700	[thread overview]
Message-ID: <20200903031907.GA103631@roeck-us.net> (raw)
In-Reply-To: <20200831001010.GA92208@roeck-us.net>

On Sun, Aug 30, 2020 at 05:10:10PM -0700, Guenter Roeck wrote:
> On Mon, Aug 31, 2020 at 12:36:21AM +0300, Laurent Pinchart wrote:
> > Hi Guenter,
> > 
> [ ... ]
> 
> > I'll try to prototype what I envision would be a good solution in the
> > V4L2 core. If stars align, I may even try to push it one level up, to
> > the chardev layer. Would you then be able to test it ?
> > 
> 
> Sure, I'll be happy to do that.
> 
> I ordered a couple of non-UVC webcams (pwc and gspca) from eBay for
> comparison. Both of those use the v4l2 locking mechanism, so we should
> be able to see the difference.
> 

Turns out gspca webcams (or at least the one I got - Logitech QuickCam for
Notebooks Deluxe) don't have a problem. As mentioned before, the gspca
driver uses the locking mechanism provided by the v4l2/vb2 code. Unlike
uvcvideo, its open function doesn't trigger sending send usb packets.
Its usb disconnect function acquires the lock, and the rest of the code
holds that lock where needed. I''ll keep trying, but so far I can't
get it to do anything wrong.

I am still waiting for the pwc webcam, but that also uses the v4l2/vb2
locking mechanism, and it seems unlikely that I'll get it to fail.
I'll try anyway.

Guenter

      reply	other threads:[~2020-09-03  3:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-30 15:04 [PATCH 0/5] media: uvcvideo: Fix race conditions Guenter Roeck
2020-08-30 15:04 ` [PATCH 1/5] media: uvcvideo: Cancel async worker earlier Guenter Roeck
2020-08-30 15:04 ` [PATCH 2/5] media: uvcvideo: Lock video streams and queues while unregistering Guenter Roeck
2020-08-30 15:04 ` [PATCH 3/5] media: uvcvideo: Release stream queue when unregistering video device Guenter Roeck
2020-08-30 15:04 ` [PATCH 4/5] media: uvcvideo: Protect uvc queue file operations against disconnect Guenter Roeck
2020-09-01 16:51   ` kernel test robot
2020-09-01 16:58     ` Guenter Roeck
2020-08-30 15:04 ` [PATCH 5/5] media: uvcvideo: In uvc_v4l2_open, check if video device is registered Guenter Roeck
2020-08-30 15:58 ` [PATCH 0/5] media: uvcvideo: Fix race conditions Laurent Pinchart
2020-08-30 20:48   ` Guenter Roeck
2020-08-30 21:36     ` Laurent Pinchart
2020-08-31  0:10       ` Guenter Roeck
2020-09-03  3:19         ` Guenter Roeck [this message]

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=20200903031907.GA103631@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux-uvc-devel@lists.sourceforge.net \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@iki.fi \
    /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;
as well as URLs for NNTP newsgroup(s).