Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1561909

writev error codes

Path csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod
From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject writev error codes
Date Wed, 18 Jan 2017 16:50:02 +0100
Message-ID <t10EO-5Sv-7@gated-at.bofh.it> (permalink)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.6.0 (2016-04-01)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 19
Organization linux.* mail to news gateway
X-Original-Cc Michael Kerrisk <mtk.manpages@gmail.com>, Al Viro <viro@zeniv.linux.org.uk>, LKML <linux-kernel@vger.kernel.org>
X-Original-Date Wed, 18 Jan 2017 16:44:31 +0100
X-Original-Message-ID <20170118154431.GD7021@dhcp22.suse.cz>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1561909

Show key headers only | View raw


Hi,
we have noticed that one of the LTP tests started to fail after
99526912c934 ("fix iov_iter_fault_in_readable()"). The code has expected
EINVAL while it gets EFAULT. I believe the new behavior is reasonable,
but checking the man 2 writev, there is no mention about EFAULT,
and other errnos for that matter, so it seems this is rather under
documented and it can confuse users. LTP has been fixed in the meantime
[1] but this might come unexpected to others.

In principle writev as a write
"multiplier" should be allowed all the error codes that write(2) allows,
right? I am not sure how we should reflect that. Either c&p what we have
in man 2 write or put a reference to it and only describe writev
specific, if there are any (I haven't checked that).

[1] https://github.com/linux-test-project/ltp/commit/db19194527060a962955a7db54a2f5710e69bec9
-- 
Michal Hocko
SUSE Labs

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

writev error codes Michal Hocko <mhocko@kernel.org> - 2017-01-18 16:50 +0100
  Re: writev error codes "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2017-01-19 03:20 +0100
    Re: writev error codes Michal Hocko <mhocko@kernel.org> - 2017-01-19 09:00 +0100
  Re: writev error codes Al Viro <viro@ZenIV.linux.org.uk> - 2017-01-19 04:20 +0100

csiph-web