From: Greg KH <greg@kroah.com>
To: kraxel@bytesex.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Fix bug in v4l core for 2.6.0-test3-bk
Date: Fri, 22 Aug 2003 10:13:05 -0700 [thread overview]
Message-ID: <20030822171305.GA9631@kroah.com> (raw)
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);
}
reply other threads:[~2003-08-22 17:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030822171305.GA9631@kroah.com \
--to=greg@kroah.com \
--cc=kraxel@bytesex.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox