Re: video(4) multiple opens

2021-02-13 Thread Marcus Glocker
On Sat, Feb 13, 2021 at 10:45:17AM +0100, Claudio Jeker wrote: > On Sat, Feb 13, 2021 at 10:26:48AM +0100, Marcus Glocker wrote: > > On Sat, Feb 13, 2021 at 08:30:04AM +0100, Claudio Jeker wrote: > > > > > On Fri, Feb 12, 2021 at 10:59:05PM +0100, Jeremie Courreges-Anglas wrote: > > > > On Wed,

Re: video(4) multiple opens

2021-02-13 Thread Claudio Jeker
On Sat, Feb 13, 2021 at 10:26:48AM +0100, Marcus Glocker wrote: > On Sat, Feb 13, 2021 at 08:30:04AM +0100, Claudio Jeker wrote: > > > On Fri, Feb 12, 2021 at 10:59:05PM +0100, Jeremie Courreges-Anglas wrote: > > > On Wed, Feb 10 2021, Martin Pieuchot wrote: > > > > > > [...] > > > > > > >

Re: video(4) multiple opens

2021-02-13 Thread Marcus Glocker
On Sat, Feb 13, 2021 at 08:30:04AM +0100, Claudio Jeker wrote: > On Fri, Feb 12, 2021 at 10:59:05PM +0100, Jeremie Courreges-Anglas wrote: > > On Wed, Feb 10 2021, Martin Pieuchot wrote: > > > > [...] > > > > > Which fields is the new lock protecting? Why isn't the KERNEL_LOCK() > > > enough?

Re: video(4) multiple opens

2021-02-12 Thread Claudio Jeker
On Fri, Feb 12, 2021 at 10:59:05PM +0100, Jeremie Courreges-Anglas wrote: > On Wed, Feb 10 2021, Martin Pieuchot wrote: > > [...] > > > Which fields is the new lock protecting? Why isn't the KERNEL_LOCK() > > enough? > > When I mentioned this potential lack of locking to Marcus, I was >

Re: video(4) multiple opens

2021-02-12 Thread Jeremie Courreges-Anglas
On Wed, Feb 10 2021, Martin Pieuchot wrote: [...] > Which fields is the new lock protecting? Why isn't the KERNEL_LOCK() > enough? When I mentioned this potential lack of locking to Marcus, I was mistaken. Some of the functions in video.c are called from syscalls that are marked NOLOCK. But

Re: video(4) multiple opens

2021-02-10 Thread Martin Pieuchot
On 09/02/21(Tue) 20:35, Marcus Glocker wrote: > jca@ has recently committed a change to video(4) to allow the same > process to do multiple opens on the same video device to satisfy > certain applications, and start to go in to the V4L2 "1.1.4 Multiple > Opens" specification direction as described

video(4) multiple opens

2021-02-09 Thread Marcus Glocker
jca@ has recently committed a change to video(4) to allow the same process to do multiple opens on the same video device to satisfy certain applications, and start to go in to the V4L2 "1.1.4 Multiple Opens" specification direction as described here:

Re: video(4) multiple opens

2021-01-06 Thread Jeremie Courreges-Anglas
On Wed, Jan 06 2021, Marcus Glocker wrote: > On Tue, Jan 05, 2021 at 11:54:31PM +0100, Jeremie Courreges-Anglas wrote: [...] >> Here's the diff. IIUC the use of atomic operations isn't strictly >> needed here since open(2) runs with the kernel lock, but the result >> is easy to understand IMO.

Re: video(4) multiple opens

2021-01-06 Thread Marcus Glocker
On Tue, Jan 05, 2021 at 11:54:31PM +0100, Jeremie Courreges-Anglas wrote: > > I hit a weird failure with firefox and BigBlueButton > (https://bigbluebutton.org/) where firefox can't use my webcam. > video(1) works, same for other webrtc sites in firefox, eg meet.jit.si. > ktrace shows that a

video(4) multiple opens

2021-01-05 Thread Jeremie Courreges-Anglas
I hit a weird failure with firefox and BigBlueButton (https://bigbluebutton.org/) where firefox can't use my webcam. video(1) works, same for other webrtc sites in firefox, eg meet.jit.si. ktrace shows that a single firefox process tries to open /dev/video0 more than once, and that fails with