[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0906231049520.17001@makko.or.mcafeemobile.com>
Date: Tue, 23 Jun 2009 10:51:28 -0700 (PDT)
From: Davide Libenzi <davidel@...ilserver.org>
To: Gregory Haskins <ghaskins@...ell.com>
cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>, avi@...hat.com,
kvm@...r.kernel.org, Rusty Russell <rusty@...tcorp.com.au>,
Benjamin LaHaise <bcrl@...ck.org>,
Al Viro <viro@...IV.linux.org.uk>
Subject: Re: [patch] eventfd - revised interface and cleanups
On Tue, 23 Jun 2009, Gregory Haskins wrote:
> I think the lack of a way to got from a file* to a ctx* (or back) might
> be a problem. I am not an expert, but if I understood the gist of what
> Al Viro (cc'd) was saying early on, an fd can change meaning out from
> under you without warning.
>
> With the code the way it is now, I would need to call both
> eventfd_fget() and eventfd_ctx_fdget() to fully acquire state (unless I
> am missing something). I would think that is a race and I am not
> guaranteed to get the same object. Can we also have a way to convert
> one reference to the other? I am thinking
>
> struct eventfd_ctx *eventfd_ctx_fget(struct file *)
>
> (or similar) would be sufficient.
You're right. That function was available in the previous patch, but then
I dropped it because I thought the eventfd code could be simplified. But
yes, it's needed.
- Davide
--
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