From: Al Viro <viro@ZenIV.linux.org.uk>
To: David Miller <davem@davemloft.net>
Cc: ydroneaud@opteya.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] net: handle error more gracefully in socketpair()
Date: Fri, 6 Dec 2013 10:48:05 +0000 [thread overview]
Message-ID: <20131206104805.GM10323@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20131205.194355.1677309681391704143.davem@davemloft.net>
On Thu, Dec 05, 2013 at 07:43:55PM -0500, David Miller wrote:
> From: Yann Droneaud <ydroneaud@opteya.com>
> Date: Fri, 06 Dec 2013 00:15:31 +0100
>
> > AFAIK, using sys_close() seems to be the exception, and writing the file
> > descriptor before installing it is the more or less the norm.
>
> What other system call in the kernel writes a file descriptor's value
> into the address space of a user process before the file descriptor
> is actually usable?
>
> That's really terrible semantically.
What's the problem with that? If nothing else, shared descriptor table is
a lot more visible to other threads than two-element array, most likely
in stack frame of whoever makes that syscall...
As for your question, how about pipe(2)?
next prev parent reply other threads:[~2013-12-06 10:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 9:36 [PATCH] net: use a proper error path in socketpair() Yann Droneaud
2013-12-02 10:12 ` [PATCH v2] net: handle error more gracefully " Yann Droneaud
2013-12-05 21:23 ` David Miller
2013-12-05 23:15 ` Yann Droneaud
2013-12-06 0:43 ` David Miller
2013-12-06 10:10 ` Yann Droneaud
2013-12-06 10:48 ` Al Viro [this message]
2013-12-06 17:14 ` David Miller
2013-12-09 21:42 ` [PATCH v3] " Yann Droneaud
2013-12-11 3:24 ` David Miller
2013-12-11 9:32 ` Yann Droneaud
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131206104805.GM10323@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ydroneaud@opteya.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).