From: Al Viro <viro@ZenIV.linux.org.uk>
To: Nick Alcock <nick.alcock@oracle.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vfs: respect FMODE_UNSIGNED_OFFSET in p(read|write)[v]*().
Date: Wed, 29 Jan 2014 15:18:12 +0000 [thread overview]
Message-ID: <20140129151812.GJ10323@ZenIV.linux.org.uk> (raw)
In-Reply-To: <87ppnbf1b3.fsf@spindle.srvr.nix>
On Wed, Jan 29, 2014 at 11:57:20AM +0000, Nick Alcock wrote:
> ssize_t ret = -EBADF;
>
> - if (pos < 0)
> + f = fdget(fd);
> + if ((pos < 0) && (!f.file || !unsigned_offsets(f.file))) {
> + fdput(f);
> return -EINVAL;
> + }
... and now pread(-1, ...) fails with EINVAL instead of EBADF.
next prev parent reply other threads:[~2014-01-29 15:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-29 11:57 [PATCH] vfs: respect FMODE_UNSIGNED_OFFSET in p(read|write)[v]*() Nick Alcock
2014-01-29 15:18 ` Al Viro [this message]
2014-01-29 16:53 ` Nick Alcock
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=20140129151812.GJ10323@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nick.alcock@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).