Serious bug, acks for partial writes were missing.

Unfortunately this was not seen while normal work.
In vstorage context it shows itself when a CS is restarted.
Then client may hang for 5 seconds closing each socket, which
triggers shaman timeout.

https://pmc.acronis.work/browse/VSTOR-84977

Signed-off-by: Alexey Kuznetsov <kuz...@acronis.com>
---
 net/unix/af_unix.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 2f4d192..5ca5b32 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2171,7 +2171,12 @@ static int unix_stream_sendmsg(struct socket *sock, 
struct msghdr *msg,
                send_sig(SIGPIPE, current, 0);
        err = -EPIPE;
 out_err:
-       net_zcopy_put_abort(uarg, true);
+       if (uarg) {
+               if (!sent)
+                       net_zcopy_put_abort(uarg, true);
+               else
+                       net_zcopy_put(uarg);
+       }
        scm_destroy(&scm);
        return sent ? : err;
 }
-- 
1.8.3.1

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to