linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] preadv2: Note preadv2(..., RWF_NOWAIT) bug in BUGS section
@ 2021-06-01 14:15 Will Manley
  2021-06-28 20:19 ` Alejandro Colomar (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: Will Manley @ 2021-06-01 14:15 UTC (permalink / raw)
  To: linux-man, Alejandro Colomar, Michael Kerrisk

From 4116851719f068bd4117f5d37ead700e88219de4 Mon Sep 17 00:00:00 2001
From: William Manley <will@williammanley.net>
Date: Tue, 1 Jun 2021 15:10:22 +0100
Subject: [PATCH] preadv2: Note preadv2(..., RWF_NOWAIT) bug in BUGS section

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
and https://github.com/tokio-rs/tokio/issues/3803 for more information.
---
 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),
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] preadv2: Note preadv2(..., RWF_NOWAIT) bug in BUGS section
  2021-06-01 14:15 [PATCH] preadv2: Note preadv2(..., RWF_NOWAIT) bug in BUGS section Will Manley
@ 2021-06-28 20:19 ` Alejandro Colomar (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Alejandro Colomar (man-pages) @ 2021-06-28 20:19 UTC (permalink / raw)
  To: will, linux-man, Michael Kerrisk

Hi Will,

On 6/1/21 4:15 PM, Will Manley wrote:
> 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
> and https://github.com/tokio-rs/tokio/issues/3803 for more information.

Thanks. Patch applied.
Sorry for the delay!

I applied a few minor tweaks to your patch. See
<https://github.com/alejandro-colomar/man-pages/commits/main>.
I also added a signed-off-by line on your behalf.

Thanks,

Alex

> ---
>   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),
> 


-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-28 20:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 14:15 [PATCH] preadv2: Note preadv2(..., RWF_NOWAIT) bug in BUGS section Will Manley
2021-06-28 20:19 ` Alejandro Colomar (man-pages)

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).