From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Ulrich Drepper <drepper@redhat.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
akpm@linux-foundation.org, torvalds@linux-foundation.org
Subject: Re: [PATCH] alternative^2 to sys_indirect: socket, socketpair
Date: Thu, 24 Apr 2008 17:03:25 +0100 [thread overview]
Message-ID: <20080424170325.569afa43@the-village.bc.nu> (raw)
In-Reply-To: <200804241618.m3OGI9kd013025@devserv.devel.redhat.com>
Comments all come down to implementation details and it basically looks
sound and fairly small clean change (especially when the various wrappers
and _flags changes were replaced by just fixing up the callers to
functions in a final implementation.
Add a new accept() and it looks good to me
> - fd = get_unused_fd();
> + fd = get_unused_fd_flags(flags);
Better to fix up the existing users who don't pass flags (and check why
they need not to), Implementation detail
> -int sock_map_fd(struct socket *sock)
> +static int sock_map_fd_flags(struct socket *sock, int flags)
No need to rename these, the compiler errors will let us quickly
find/fix any users.
> +int sock_map_fd(struct socket *sock)
> +{
> + return sock_map_fd_flags(sock, 0);
> +}
Ditto
> + /* Extract the close-on-exec flag. */
> + if ((type & SOCK_CLOEXEC) != 0) {
> + fflags = O_CLOEXEC;
> + type &= ~SOCK_CLOEXEC;
> + /* Extract the close-on-exec flag. */
> + if ((type & SOCK_CLOEXEC) != 0) {
> + fflags = O_CLOEXEC;
> + type &= ~SOCK_CLOEXEC;
> + }
Should probably be done once in one place in case we ever add future flags
--
--
"Alan, I'm getting a bit worried about you."
-- Linus Torvalds
next prev parent reply other threads:[~2008-04-24 16:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-24 16:18 Ulrich Drepper
2008-04-24 16:03 ` Alan Cox [this message]
2008-04-24 16:37 ` Ulrich Drepper
2008-04-24 17:23 ` Alan Cox
2008-04-25 1:40 ` David Miller
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=20080424170325.569afa43@the-village.bc.nu \
--to=alan@lxorguk.ukuu.org.uk \
--cc=akpm@linux-foundation.org \
--cc=drepper@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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
all inboxes | Powered by JetHome®