From: jgmyers@netscape.com (John Myers)
To: Joel Becker <jlbec@evilplan.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"linux-aio@kvack.org" <linux-aio@kvack.org>
Subject: Re: [PATCH 2.5.71-mm1] aio process hang on EINVAL
Date: Wed, 18 Jun 2003 17:58:45 -0700 [thread overview]
Message-ID: <3EF10AC5.3040301@netscape.com> (raw)
In-Reply-To: <20030619004130.GP7895@parcelfarce.linux.theplanet.co.uk>
[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]
Joel Becker wrote:
> The slippery slope isn't important. POSIX specifies EAGAIN (you concede that), EBADF, and EINVAL against nbytes|offset|reqprio.
>The kernel does these checks already (where applicable).
>
EAGAIN doesn't require user space to fire any per-operation callbacks or
take any per-operation action. One merely needs to retry the io_submit().
The existing EBADF and EFAULT conditions indicate buggy code. Correctly
written programs will never encounter these. An appropriate action is
to assert or otherwise shut down the entire process. Similarly for
EINVAL against the reserved fields, aio_buf, and nbytes. I'll also
grant that EINVAL against offset and reqprio would also indicate buggy code.
EINVAL caused by a fd that doesn't support the particular opcode could
be encountered by a correctly written program which is given the wrong
sort of file by a user. I would prefer such errors be reported through
io_getevents() so they can be handled by the operation's callback/event
handling code.
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3941 bytes --]
next prev parent reply other threads:[~2003-06-19 0:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-17 0:43 [PATCH 2.5.71-mm1] aio process hang on EINVAL Daniel McNeil
2003-06-17 1:33 ` John Myers
2003-06-17 3:24 ` Suparna Bhattacharya
2003-06-17 18:31 ` John Myers
2003-06-17 21:06 ` Daniel McNeil
2003-06-18 0:03 ` John Myers
2003-06-18 0:15 ` Joel Becker
2003-06-18 0:25 ` John Myers
2003-06-18 0:42 ` Joel Becker
2003-06-19 0:33 ` John Myers
2003-06-19 0:41 ` Joel Becker
2003-06-19 0:58 ` John Myers [this message]
2003-06-19 1:48 ` Scot McKinley
2003-06-19 20:54 ` John Myers
2003-06-19 22:42 ` Scot McKinley
2003-06-18 5:11 ` Scot McKinley
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=3EF10AC5.3040301@netscape.com \
--to=jgmyers@netscape.com \
--cc=jlbec@evilplan.org \
--cc=linux-aio@kvack.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox