[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200422161343.GM23230@ZenIV.linux.org.uk>
Date: Wed, 22 Apr 2020 17:13:43 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Matthew Wilcox <willy@...radead.org>
Cc: Nate Karstens <nate.karstens@...min.com>,
Jeff Layton <jlayton@...nel.org>,
"J. Bruce Fields" <bfields@...ldses.org>,
Arnd Bergmann <arnd@...db.de>,
Richard Henderson <rth@...ddle.net>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Matt Turner <mattst88@...il.com>,
"James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
Helge Deller <deller@....de>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
linux-fsdevel@...r.kernel.org, linux-arch@...r.kernel.org,
linux-alpha@...r.kernel.org, linux-parisc@...r.kernel.org,
sparclinux@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Changli Gao <xiaosuo@...il.com>
Subject: Re: Implement close-on-fork
On Wed, Apr 22, 2020 at 05:00:32PM +0100, Al Viro wrote:
> *snort*
>
> Alan Coopersmith in that thread:
> || https://lwn.net/Articles/785430/ suggests AIX, BSD, & MacOS have also defined
> || it, and though it's been proposed multiple times for Linux, never adopted there.
>
> Now, look at the article in question. You'll see that it should've been
> "someone's posting in the end of comments thread under LWN article says that
> apparently it exists on AIX, BSD, ..."
>
> The strength of evidence aside, that got me curious; I have checked the
> source of FreeBSD, NetBSD and OpenBSD. No such thing exists in either of
> their kernels, so at least that part can be considered an urban legend.
>
> As for the original problem... what kind of exclusion is used between
> the reaction to netlink notifications (including closing every socket,
> etc.) and actual IO done on those sockets?
Not an idle question, BTW - unlike Solaris we do NOT (and will not) have
close(2) abort IO on the same descriptor from another thread. So if one
thread sits in recvmsg(2) while another does close(2), the socket will
*NOT* actually shut down until recvmsg(2) returns.
Powered by blists - more mailing lists