All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: linux-sctp@vger.kernel.org, netdev@vger.kernel.org,
	Vlad Yasevich <vyasevich@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Andreas Steinmetz <ast@domdv.de>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Subject: Re: [PATCH] sctp: Add peeloff-flags socket option
Date: Thu, 29 Jun 2017 22:56:21 +0000	[thread overview]
Message-ID: <20170629225621.GN10672@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20170629181340.12423-1-nhorman@tuxdriver.com>

On Thu, Jun 29, 2017 at 02:13:40PM -0400, Neil Horman wrote:
> diff --git a/fs/file.c b/fs/file.c
> index 1c2972e..a4521da 100644
> --- a/fs/file.c
> +++ b/fs/file.c
> @@ -807,6 +807,7 @@ void set_close_on_exec(unsigned int fd, int flag)
>  		__clear_close_on_exec(fd, fdt);
>  	spin_unlock(&files->file_lock);
>  }
> +EXPORT_SYMBOL(set_close_on_exec);

Huh?

> +	set_close_on_exec(peeloff->sd, !!(flags & SOCK_CLOEXEC));

Why hadn't you set it when that descriptor had been allocated?
That
        retval = get_unused_fd_flags(0);
could just pass O_CLOEXEC and you'd get it set from the very
beginning...

WARNING: multiple messages have this Message-ID (diff)
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: linux-sctp@vger.kernel.org, netdev@vger.kernel.org,
	Vlad Yasevich <vyasevich@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Andreas Steinmetz <ast@domdv.de>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Subject: Re: [PATCH] sctp: Add peeloff-flags socket option
Date: Thu, 29 Jun 2017 23:56:21 +0100	[thread overview]
Message-ID: <20170629225621.GN10672@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20170629181340.12423-1-nhorman@tuxdriver.com>

On Thu, Jun 29, 2017 at 02:13:40PM -0400, Neil Horman wrote:
> diff --git a/fs/file.c b/fs/file.c
> index 1c2972e..a4521da 100644
> --- a/fs/file.c
> +++ b/fs/file.c
> @@ -807,6 +807,7 @@ void set_close_on_exec(unsigned int fd, int flag)
>  		__clear_close_on_exec(fd, fdt);
>  	spin_unlock(&files->file_lock);
>  }
> +EXPORT_SYMBOL(set_close_on_exec);

Huh?

> +	set_close_on_exec(peeloff->sd, !!(flags & SOCK_CLOEXEC));

Why hadn't you set it when that descriptor had been allocated?
That
        retval = get_unused_fd_flags(0);
could just pass O_CLOEXEC and you'd get it set from the very
beginning...

  parent reply	other threads:[~2017-06-29 22:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29 18:13 [PATCH] sctp: Add peeloff-flags socket option Neil Horman
2017-06-29 18:13 ` Neil Horman
2017-06-29 19:04 ` Marcelo Ricardo Leitner
2017-06-29 19:04   ` Marcelo Ricardo Leitner
2017-06-29 22:56 ` Al Viro [this message]
2017-06-29 22:56   ` Al Viro
2017-06-30 15:35 ` [PATCH v2] " Neil Horman
2017-06-30 15:35   ` Neil Horman
2017-06-30 16:29   ` Marcelo Ricardo Leitner
2017-06-30 16:29     ` Marcelo Ricardo Leitner
2017-06-30 17:32 ` [PATCH v3] " Neil Horman
2017-06-30 17:32   ` Neil Horman
2017-07-01 17:29   ` Marcelo Ricardo Leitner
2017-07-01 17:29     ` Marcelo Ricardo Leitner
2017-07-01 22:26   ` David Miller
2017-07-01 22:26     ` 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=20170629225621.GN10672@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=ast@domdv.de \
    --cc=davem@davemloft.net \
    --cc=linux-sctp@vger.kernel.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=vyasevich@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.