All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Steinmetz <ast@domdv.de>
To: linux-sctp@vger.kernel.org
Subject: SCTP_SOCKOPT_PEELOFF is missing SOCK_CLOEXEC (and SOCK_NONBLOCK)
Date: Tue, 20 Jun 2017 13:24:13 +0000	[thread overview]
Message-ID: <1497965053.10887.2.camel@domdv.de> (raw)

[please CC me, I'm not subscribed]

It seems that if one does a getsockopt(SCTP_SOCKOPT_PEELOFF) a.k.a.
sctp_peeloff(), even if the socket descriptor from which the
association is to be peeled off has SOCK_CLOEXEC/SOCK_NONBLOCK set,
the peeled off socket descriptor doesn't have so.

It would be advisable to either clone these flags or add an atomic
version of SCTP_SOCKOPT_PEELOFF (accept4() style).

The missing SOCK_CLOEXEC requires unintentional additional locking
which typically is prone to errors and can slow down processing.
-- 
Andreas Steinmetz                       SPAMmers use robotrap@domdv.de

             reply	other threads:[~2017-06-20 13:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20 13:24 Andreas Steinmetz [this message]
2017-06-20 14:39 ` SCTP_SOCKOPT_PEELOFF is missing SOCK_CLOEXEC (and SOCK_NONBLOCK) Neil Horman
2017-06-20 15:41 ` Marcelo Ricardo Leitner
2017-06-20 18:14 ` Neil Horman
2017-06-20 18:56 ` Marcelo Ricardo Leitner
2017-06-20 19:00 ` Neil Horman
2017-06-20 19:21 ` Marcelo Ricardo Leitner
2017-06-21 10:13 ` Andreas Steinmetz
2017-06-21 12:27 ` Neil Horman
2017-06-21 18:53 ` Marcelo Ricardo Leitner
2017-06-22  1:53 ` Neil Horman
2017-06-23 19:14 ` Neil Horman
2017-06-23 19:33 ` Marcelo Ricardo Leitner
2017-06-25 12:06 ` Neil Horman
2017-06-26  9:57 ` Andreas Steinmetz
2017-06-26 17:44 ` Neil Horman
2017-06-28 13:12 ` Neil Horman
2017-06-29 17:33 ` Neil Horman

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=1497965053.10887.2.camel@domdv.de \
    --to=ast@domdv.de \
    --cc=linux-sctp@vger.kernel.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 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.