All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Knorr <kraxel@bytesex.org>
To: Linus Torvalds <torvalds@transmeta.com>,
	Kernel List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@digeo.com>, Greg KH <greg@kroah.com>
Subject: Re: [patch] v4l: sysfs'ify videodev
Date: Thu, 7 Aug 2003 19:02:11 +0200	[thread overview]
Message-ID: <20030807170211.GA3620@bytesex.org> (raw)
In-Reply-To: <20030807165519.A32452@flint.arm.linux.org.uk>

On Thu, Aug 07, 2003 at 04:55:19PM +0100, Russell King wrote:
> On Thu, Aug 07, 2003 at 05:43:42PM +0200, Gerd Knorr wrote:
> > +static void video_release(struct class_device *cd)
> > +{
> > +	struct video_device *vfd = container_of(cd, struct video_device, class_dev);
> >  
> > -static struct proc_dir_entry *video_dev_proc_entry = NULL;
> > -struct proc_dir_entry *video_proc_entry = NULL;
> > -EXPORT_SYMBOL(video_proc_entry);
> > -LIST_HEAD(videodev_proc_list);
> > +#if 1 /* needed until all drivers are fixed */
> > +	if (!vfd->release)
> > +		return;
> > +#endif
> > +	vfd->release(vfd);
> > +}
> 
> Ok, so you're allowing the release to happen elsewhere.  How are you
> ensuring that the code which vfd->release points to hasn't been
> unloaded before the video device has been released,

Which exact corner case you are refering to?  video_release() being
called _after_ video_unregister_device() returns due to a sysfs file
being busy?  Doesn't sysfs refcounting take care of that?  If not
module_{get|put}(vfd->fops->owner) at sensible places should fix that.
get in video_unregister_device(), put in video_release()?

> or, even, how
> are you preventing the module containing the above code being
> removed before all video devices have been released?

videodev.ko simply can't be unloaded while v4l drivers are loaded
due to symbol references.

  Gerd

-- 
sigfault

      reply	other threads:[~2003-08-07 17:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-07 15:43 [patch] v4l: sysfs'ify videodev Gerd Knorr
2003-08-07 15:55 ` Russell King
2003-08-07 17:02   ` Gerd Knorr [this message]

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=20030807170211.GA3620@bytesex.org \
    --to=kraxel@bytesex.org \
    --cc=akpm@digeo.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.