Fix bug in v4l core for 2.6.0-test3-bk
PATCH 1/1 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.
drivers/media/video/videodev.c +1 -1
@@ -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); }