Thread (92 messages) 92 messages, 7 authors, 2021-08-11

Re: [PATCH 01/32] readv2: Note preadv2(..., RWF_NOWAIT) bug in BUGS section

flat view

From: Michael Kerrisk (man-pages) <hidden>
Date: 2021-08-08 02:29:55

Hello Will and Alex,

On 7/28/21 10:19 PM, Alejandro Colomar wrote:
From: Will Manley <redacted>

To save the next person before they fall foul of it.  See
<https://lore.kernel.org/linux-fsdevel/fea8b16d-5a69-40f9-b123-e84dcd6e8f2e@www.fastmail.com/T/#u (local)>
and <https://github.com/tokio-rs/tokio/issues/3803> for more information.

Signed-off-by: Will Manley <redacted>
Signed-off-by: Alejandro Colomar <redacted>
Patch applied, but see my follow-up mail.

Thanks,

Michael
quoted hunk ↗ jump to hunk
---
 man2/readv.2 | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/man2/readv.2 b/man2/readv.2
index df42cf830..3355fa9d7 100644
--- a/man2/readv.2
+++ b/man2/readv.2
@@ -243,7 +243,9 @@ If some data was successfully read, it will return the number of bytes read.
 If no bytes were read, it will return \-1 and set
 .IR errno
 to
-.BR EAGAIN .
+.BR EAGAIN
+(but see
+.BR BUGS ")."
 Currently, this flag is meaningful only for
 .BR preadv2 ().
 .TP
@@ -425,6 +427,13 @@ iov[1].iov_len = strlen(str1);
 nwritten = writev(STDOUT_FILENO, iov, 2);
 .EE
 .in
+.SH BUGS
+Linux v5.9 and v5.10 have a bug where
+.BR preadv2()
+with the
+.BR RWF_NOWAIT
+flag may return 0 even when not at end of file.  See
+https://lore.kernel.org/linux-fsdevel/fea8b16d-5a69-40f9-b123-e84dcd6e8f2e@www.fastmail.com/T/#u
 .SH SEE ALSO
 .BR pread (2),
 .BR read (2),

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help