Oliver Neukum wrote:
> 
> Hi,
> 
> would anybody object to me adding a semaphore to the video_device structure ?
> It would be taken by read & write in the v4l layer. This would cure races in
> the usb v4l devices.
> 
> The problem is, that, although opening is exvlusive in v4l, threads can share
> fds. Thus read & write must be protected.
> 
> On a related note: v4l open has an SMP race condition. Please test the
> attached fix.
> 
>         Regards
>                 Oliver

Rather make this per open than per device.  As is, it will really hurt
performance with multiple capturing opens (or doesn't v4l1 allow
this?).  Can't the driver implement it's own semaphore if it needs it?

-justin



_______________________________________________
Video4linux-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/video4linux-list

Reply via email to