[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200906241255.54709.rusty@rustcorp.com.au>
Date: Wed, 24 Jun 2009 12:55:54 +0930
From: Rusty Russell <rusty@...tcorp.com.au>
To: Davide Libenzi <davidel@...ilserver.org>
Cc: Gregory Haskins <ghaskins@...ell.com>, mst@...hat.com,
kvm@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
avi@...hat.com, paulmck@...ux.vnet.ibm.com,
Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH 3/3] eventfd: add internal reference counting to fix notifier race conditions
On Tue, 23 Jun 2009 03:33:22 am Davide Libenzi wrote:
> What you're doing there, is setting up a kernel-to-kernel (since
> userspace only role is to create the eventfd) communication, using a file*
> as accessory. That IMO is plain wrong.
The most sensible is that userspace can use these fds; an in-kernel variant is
possible too, but not primary IMHO.
It's nice that userspace create the fds; it can then use the same fd for
multiple event sources.
But I didn't see anything wrong with the way eventfd used to work: you have a
kvm ioctl to say "attach this eventfd to this guest notification" and that does
the eventfd_fget. A detach ioctl does the fput (as does release of the kvm
fd).
If they close the eventfd and don't do the detach ioctl, it's their problem.
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists