[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0909161726090.3124@makko.or.mcafeemobile.com>
Date: Wed, 16 Sep 2009 17:30:18 -0700 (PDT)
From: Davide Libenzi <davidel@...ilserver.org>
To: Gilad Benjamini <gilad@...ornetworks.com>
cc: 'Linux Kernel Mailing List' <linux-kernel@...r.kernel.org>
Subject: RE: epoll and closed file descriptors
On Wed, 16 Sep 2009, Gilad Benjamini wrote:
> I would, but epoll is preventing me from doing so.
> Early in sys_epoll_ctl there are these lines
>
> file = fget(epfd);
> if (!file)
> goto error_return;
>
> Leaving me in a kind of dead lock
The 'epfd' in there, is the _epoll fd_, which, if fget() fails, means you
close it.
You see likely failing the 'tfile = fget(fd)' (of course, you closed it),
so if someone else keeps the socket open and you have no chance in telling
it to drop it (really?), you need to remove the socket from the set before
closing it.
- 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