Re: [V4L] races in v4l read + write in 2.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux