From: Rick Jones <rick.jones2@hpe•com>
To: Dexuan Cui <decui@microsoft•com>, David Miller <davem@davemloft•net>
Cc: "gregkh@linuxfoundation•org" <gregkh@linuxfoundation•org>,
"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
"linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>,
"devel@linuxdriverproject•org" <devel@linuxdriverproject•org>,
"olaf@aepfle•de" <olaf@aepfle•de>,
"apw@canonical•com" <apw@canonical•com>,
"jasowang@redhat•com" <jasowang@redhat•com>,
"vkuznets@redhat•com" <vkuznets@redhat•com>,
"cavery@redhat•com" <cavery@redhat•com>,
KY Srinivasan <kys@microsoft•com>,
Haiyang Zhang <haiyangz@microsoft•com>,
"joe@perches•com" <joe@perches•com>
Subject: Re: [PATCH v12 net-next 1/1] hv_sock: introduce Hyper-V Sockets
Date: Tue, 28 Jun 2016 08:42:48 -0700 [thread overview]
Message-ID: <57729AF8.3050708@hpe.com> (raw)
In-Reply-To: <CO2PR03MB2182CC1DA2804F09D8D77A70BF220@CO2PR03MB2182.namprd03.prod.outlook.com>
On 06/28/2016 02:59 AM, Dexuan Cui wrote:
> The idea here is: IMO the syscalls sys_read()/write() shoudn't return
> -ENOMEM, so I have to make sure the buffer allocation succeeds?
>
> I tried to use kmalloc with __GFP_NOFAIL, but I hit a warning in
> in mm/page_alloc.c:
> WARN_ON_ONCE((gfp_flags & __GFP_NOFAIL) && (order > 1));
>
> What error code do you think I should return?
> EAGAIN, ERESTARTSYS, or something else?
>
> May I have your suggestion? Thanks!
What happens as far as errno is concerned when an application makes a
read() call against a (say TCP) socket associated with a connection
which has been reset? Is it limited to those errno values listed in the
read() manpage, or does it end-up getting an errno value from those
listed in the recv() manpage? Or, perhaps even one not (presently)
listed in either?
rick jones
next prev parent reply other threads:[~2016-06-28 15:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-24 7:45 [PATCH v12 net-next 1/1] hv_sock: introduce Hyper-V Sockets Dexuan Cui
2016-06-28 9:33 ` David Miller
2016-06-28 9:59 ` Dexuan Cui
2016-06-28 13:45 ` David Miller
2016-06-28 15:29 ` Dexuan Cui
2016-06-28 15:42 ` Rick Jones [this message]
2016-06-29 9:17 ` Dexuan Cui
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=57729AF8.3050708@hpe.com \
--to=rick.jones2@hpe$(echo .)com \
--cc=apw@canonical$(echo .)com \
--cc=cavery@redhat$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=decui@microsoft$(echo .)com \
--cc=devel@linuxdriverproject$(echo .)org \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=haiyangz@microsoft$(echo .)com \
--cc=jasowang@redhat$(echo .)com \
--cc=joe@perches$(echo .)com \
--cc=kys@microsoft$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=olaf@aepfle$(echo .)de \
--cc=vkuznets@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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