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

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



Alan Cox wrote:
> > If this was to be done what good is videodev.c ?
> 
> videodev.c just handles minor number registration. Everything else it tried to
> help with was an error

*pounce*

What do you think about the attached patch, against 2.4.0-test10-pre7?

-- 
Jeff Garzik             | "Mind if I drive?"  -Sam
Building 1024           | "Not if you don't mind me clawing at the
MandrakeSoft            |  dash and shrieking like a cheerleader."
                        |                     -Max
Index: include/linux/videodev.h
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/include/linux/videodev.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 videodev.h
--- include/linux/videodev.h	2000/10/22 19:36:11	1.1.1.1
+++ include/linux/videodev.h	2000/10/31 07:17:03
@@ -32,6 +32,7 @@
 	int busy;
 	int minor;
 	devfs_handle_t devfs_handle;
+	struct file_operation *fops;
 };
 
 extern int videodev_init(void);
Index: drivers/media/video/videodev.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/media/video/videodev.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 videodev.c
--- drivers/media/video/videodev.c	2000/10/22 21:28:40	1.1.1.1
+++ drivers/media/video/videodev.c	2000/10/31 07:17:03
@@ -476,6 +476,7 @@
 			    devfs_register (NULL, name, DEVFS_FL_DEFAULT,
 					    VIDEO_MAJOR, vfd->minor,
 					    S_IFCHR | S_IRUSR | S_IWUSR,
+					    vfd->fops ? vfd->fops :
 					    &video_fops, NULL);
 
 #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)

[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