lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0802281124330.7660@alien.or.mcafeemobile.com>
Date:	Thu, 28 Feb 2008 11:27:45 -0800 (PST)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Valdis.Kletnieks@...edu
cc:	7eggert@....de, Michael Kerrisk <mtk.manpages@...glemail.com>,
	Pierre Habouzit <madcoder@...ian.org>,
	lkml <linux-kernel@...r.kernel.org>,
	Eric Dumazet <dada1@...mosbay.com>,
	Marc Lehmann <schmorp@...morp.de>,
	David Schwartz <davids@...master.com>
Subject: Re: epoll and shared fd's

On Thu, 28 Feb 2008, Valdis.Kletnieks@...edu wrote:

> On Tue, 26 Feb 2008 19:16:30 +0100, Bodo Eggert said:
> > Michael Kerrisk <mtk.manpages@...glemail.com> wrote:
> 
> > >               file  handle  have  been  closed.  This means that
> > >               even after a file descriptor that is  part  of  an
> > >               epoll  set has been closed, events may be reported
> > >               for that file descriptor if other file descriptors
> > >               referring  to the same underlying file description
> > >               remain open.
> 
> Is it worth making special mention of the case where a process gets events
> for a FD that it has closed, because a parent or child process still has
> an inherited copy of the FD still open?

And for all the others, there's epoll_ctl(EPOLL_CTL_DEL) :)
The close(2) (f_op->release actually) hook is for cleanup semantics. If 
you play with multiple processes, just use epoll_ctl(EPOLL_CTL_DEL) and 
you'll be fine.



- 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ