From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: David Ellingsworth <david@identd.dyndns.org>
Cc: video4linux-list@redhat.com,
Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: [PATCH] videodev: fix kobj ref count
Date: Wed, 09 Jul 2008 06:36:06 +0200 [thread overview]
Message-ID: <48744036.506@hhs.nl> (raw)
In-Reply-To: <30353c3d0807081923o6ba66d34oac44d5bb98fd0e3a@mail.gmail.com>
David Ellingsworth wrote:
> Mauro,
>
> If Laurent approves, please apply the following patch to the devel
> branch. I've been using it locally for the past five days or so
> without issue.
>
> This patch increments the kobject reference count during video_open
> and decrements it during video_close. Doing so allows
> video_unregister_device to be called during the disconnect callback of
> usb and pci devices. It also ensures that the video_device struct is
> not freed while it is still in use and that the kobject release
> callback occurs at the appropriate time. With this patch, the
> following sequence is now possible and no longer results in a crash.
>
> video_open
> disconnect
> video_unregister_device
> video_ioctl2 (crash was here)
> video_close
> video_release
>
I like this patch, I really do, as currently this refcounting needs to
be done in all v4l devices seperately, and an video_ioctl2 wrapper needs
to be used to stop the crash (check if device was disconnected and thus
video_unregister_device was called and ifso don't call video_ioctl2).
So I've taken a good look and this, and I cannot find any issues.
Regards,
Hans
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next prev parent reply other threads:[~2008-07-09 4:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-09 2:23 [PATCH] videodev: fix kobj ref count David Ellingsworth
2008-07-09 4:36 ` Hans de Goede [this message]
2008-07-09 19:46 ` Laurent Pinchart
2008-07-09 20:21 ` Laurent Pinchart
2008-07-09 22:28 ` David Ellingsworth
2008-07-09 21:42 ` Laurent Pinchart
2008-07-09 23:03 ` David Ellingsworth
2008-07-10 2:33 ` David Ellingsworth
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=48744036.506@hhs.nl \
--to=j.w.r.degoede@hhs.nl \
--cc=david@identd.dyndns.org \
--cc=mchehab@infradead.org \
--cc=video4linux-list@redhat.com \
/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