lkml.org 
[lkml]   [2003]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Fix bug in v4l core for 2.6.0-test3-bk
Hi,

When working on converting the usb v4l drivers to the new v4l class
changes, I ran into this nasty bug. Seems that the core was using a
structure after it had been freed. The patch below fixes it.

If you don't mind, I'll include it with some USB patches in a send to
Linus, as my USB fixes will not work without it.

thanks,

greg k-h


# V4L: fix use after free bug in v4l core.

diff -Nru a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
--- a/drivers/media/video/videodev.c Fri Aug 22 10:09:38 2003
+++ b/drivers/media/video/videodev.c Fri Aug 22 10:09:38 2003
@@ -349,9 +349,9 @@
if(video_device[vfd->minor]!=vfd)
panic("videodev: bad unregister");

- class_device_unregister(&vfd->class_dev);
devfs_remove(vfd->devfs_name);
video_device[vfd->minor]=NULL;
+ class_device_unregister(&vfd->class_dev);
up(&videodev_lock);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.025 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site