From: Daniel Borkmann <dborkman@redhat.com>
To: linux-sctp@vger.kernel.org
Subject: Re: [PATCH] lksctp: Avoid using file descriptor 0 to get ENOTSOCK
Date: Fri, 13 Dec 2013 10:57:10 +0000 [thread overview]
Message-ID: <52AAE806.5060408@redhat.com> (raw)
In-Reply-To: <1386663562-791-1-git-send-email-xu.simon@oracle.com>
On 12/10/2013 09:19 AM, Simon Xu wrote:
> On some systems, errno will not be ENOTSOCK when operating on file descriptor
> 0 in an ssh session:
>
> test_1_to_1_accept_close.c 2 TBROK : accept with invalid socketerror:-1, errno:22
> test_1_to_1_addrs.c 2 TBROK : sctp_getladdrs with invalid socket error:-1, errno:95
> test_1_to_1_connect.c 2 TBROK : connect with invalid socket error:-1, errno:22
> test_1_to_1_recvfrom.c 2 TBROK : recvfrom with invalid socket count:0, errno:9
> test_1_to_1_recvmsg.c 2 TBROK : recvmsg with invalid socket count:0, errno:9
> test_1_to_1_send.c 2 TBROK : send with invalid socket count:15, errno:9
> test_1_to_1_sendmsg.c 2 TBROK : sendmsg with invalid socket count:-1, errno:106
> test_1_to_1_shutdown.c 2 TBROK : shutdown with an invalid socket error:0, errno:9
> test_1_to_1_socket_bind_listen.c 6 TBROK : bind() with invalid socket descriptor error:-1, errno:22
> test_1_to_1_sockopt.c 2 TBROK : setsockopt with an invalid socket error:-1, errno:95
> test_getname.c 9 TBROK : getsockname on an invalid socket error:0 errno:9
>
> This patch gets a non-socket file descriptor by creating a temporary file
> to replace file descriptor 0.
>
> Signed-off-by: Simon Xu <xu.simon@oracle.com>
Ok, applied, thank you.
prev parent reply other threads:[~2013-12-13 10:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 8:19 [PATCH] lksctp: Avoid using file descriptor 0 to get ENOTSOCK Simon Xu
2013-12-13 10:57 ` Daniel Borkmann [this message]
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=52AAE806.5060408@redhat.com \
--to=dborkman@redhat.com \
--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.