aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2024-08-06 13:43:44 +0200
committerStefano Brivio <sbrivio@redhat.com>2024-08-06 15:03:31 +0200
commit3a082c4ecb4b50d44aff21a1390826cd3a3d077e (patch)
tree32bff93d6373fb7229434c7010dc026fb13460d7
parent031df332e98d507ad153fc54ea8c4b7109b7dabf (diff)
downloadpasst-3a082c4ecb4b50d44aff21a1390826cd3a3d077e.tar
passt-3a082c4ecb4b50d44aff21a1390826cd3a3d077e.tar.gz
passt-3a082c4ecb4b50d44aff21a1390826cd3a3d077e.tar.bz2
passt-3a082c4ecb4b50d44aff21a1390826cd3a3d077e.tar.lz
passt-3a082c4ecb4b50d44aff21a1390826cd3a3d077e.tar.xz
passt-3a082c4ecb4b50d44aff21a1390826cd3a3d077e.tar.zst
passt-3a082c4ecb4b50d44aff21a1390826cd3a3d077e.zip
tcp_splice: Fix side in OUT_WAIT flag setting
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 <pholzing@redhat.com> Link: https://github.com/containers/podman/issues/23517 Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Tested-by: Paul Holzinger <pholzing@redhat.com>
-rw-r--r--tcp_splice.c2
1 files changed, 1 insertions, 1 deletions
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;
}