On Tue, Aug 06, 2024 at 02:12:49PM +0200, Stefano Brivio wrote: > If the "from" (input) side for a given transfer is 0, and we can't > complete the write right away, what we need to be waiting for is for > output readiness on side 1, not 0, and the other way around as well. > > This causes random transfer failures for local TCP connections, > depending if we ever need to wait for output readiness. > > Reported-by: Paul Holzinger > Link: https://github.com/containers/podman/issues/23517 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson And mea culpa. > --- > tcp_splice.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tcp_splice.c b/tcp_splice.c > index 473562b..483e45d 100644 > --- a/tcp_splice.c > +++ b/tcp_splice.c > @@ -577,7 +577,7 @@ eintr: > if (conn->read[fromsidei] == conn->written[fromsidei]) > break; > > - conn_event(c, conn, OUT_WAIT(fromsidei)); > + conn_event(c, conn, OUT_WAIT(!fromsidei)); > break; > } > -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson