Re: [V4L] improved fix for SMP race in open and locking for read + write

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



On Wednesday 01 November 2000 00:31, Alan Cox wrote:
> > restores and it adds some further locking as some drivers are buggy and
> > the lost latent functionality is very small. (If you absolutly must do so
> > drop the lock yourself.)
>
> The sem still belongs in drivers. To start with they have to lock versus
> ioctl and other events anyway. Most drivers are safe here (I did the radio
> cards a long time ago)

I see your argument. If there were time to go through the video drivers I'd
agree. But there isn't that time.

Is the case of multithreaded applications really worth that effort ?
I could very easily extend the semaphore to the ioctl handlers.

As laudable as your going through the radio drivers is, nobody seems to have 
gone through all video drivers or I wouldn't have found two vulnerable drivers
the first time I looked.

Now multithreaded applications can't use v4l at all for there are drivers 
with race conditions. The patch would improve that situation without
a performance loss with the exception of those few drivers whose hardware
could do anything meaningful with multiple reads.

I'd like to ask you to reconsider.
If you still don't like it tomorrow, I'll make a patch that just fixes the
SMP race in open and send Linus that.

	Regards
		Oliver





[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