public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Gregory Haskins <ghaskins@novell.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	avi@redhat.com, davidel@xmailserver.org,
	paulmck@linux.vnet.ibm.com, akpm@linux-foundation.org
Subject: Re: [KVM PATCH v2 2/2] kvm: use POLLHUP to close an irqfd instead of an explicit ioctl
Date: Thu, 18 Jun 2009 14:46:30 +0930	[thread overview]
Message-ID: <200906181446.31373.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20090615125439.GI6351@redhat.com>

On Mon, 15 Jun 2009 10:24:39 pm Michael S. Tsirkin wrote:
> On Mon, Jun 15, 2009 at 08:08:18AM -0400, Gregory Haskins wrote:
> > Hmm.  I understand what you are saying conceptually (i.e. the .text
> > could get yanked before we hit the next line of code, in this case the
> > "return 0").  However, holding a reference when you _know_ someone else
> > holds a reference to me says that one of the references is redundant.
> > In addition, there is certainly plenty of precedence for
> > module_put(THIS_MODULE) all throughout the kernel (including
> > module_put_and_exit()).  Are those broken as well?
>
> Maybe not, but I don't know why. It works fine as long as you don't
> unload any modules though :) Rusty, could you enlighten us please?

Yep, they're almost all broken.  A few have comments indicating that someone 
else is holding a reference (eg. loopback).

But at some point you give up playing whack-a-mole for random drivers.

module_put_and_exit() does *not* have this problem, BTW.

Rusty.

  reply	other threads:[~2009-06-18  5:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04 12:48 [KVM PATCH v2 0/2] irqfd: use POLLHUP notification for close() Gregory Haskins
2009-06-04 12:48 ` [KVM PATCH v2 1/2] Allow waiters to be notified about the eventfd file* going away, and give Gregory Haskins
2009-06-04 12:48 ` [KVM PATCH v2 2/2] kvm: use POLLHUP to close an irqfd instead of an explicit ioctl Gregory Haskins
2009-06-14 11:49   ` Michael S. Tsirkin
2009-06-14 12:53     ` Gregory Haskins
2009-06-14 13:28       ` Michael S. Tsirkin
2009-06-15  3:39         ` Gregory Haskins
2009-06-15  9:46           ` Michael S. Tsirkin
2009-06-15 12:08             ` Gregory Haskins
2009-06-15 12:54               ` Michael S. Tsirkin
2009-06-18  5:16                 ` Rusty Russell [this message]
2009-06-18  6:49                   ` Michael S. Tsirkin
2009-06-18 12:00                     ` Gregory Haskins
2009-06-18 12:22                       ` Michael S. Tsirkin
2009-06-18 14:03                         ` Gregory Haskins
2009-06-18 14:35                           ` Michael S. Tsirkin
2009-06-18 16:29                             ` Gregory Haskins
2009-06-19 15:37                               ` Michael S. Tsirkin
2009-06-19 16:07                                 ` Gregory Haskins
2009-06-15  3:48         ` Gregory Haskins
2009-06-04 14:02 ` [KVM PATCH v2 0/2] irqfd: use POLLHUP notification for close() Avi Kivity
2009-06-12  3:58 ` Michael S. Tsirkin
2009-06-12  4:08 ` Michael S. Tsirkin
2009-06-14 12:38   ` Gregory Haskins
2009-06-14 12:51     ` Avi Kivity

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=200906181446.31373.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@linux-foundation.org \
    --cc=avi@redhat.com \
    --cc=davidel@xmailserver.org \
    --cc=ghaskins@novell.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=paulmck@linux.vnet.ibm.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