[openssh-commits] [openssh] 01/01: upstream: check for EINTR/EAGAIN failures in the rfd fast-path; caught

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Feb 17 22:17:43 AEDT 2022


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 667fec5d4fe4406745750a32f69b5d2e1a75e94b
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Thu Feb 17 10:58:27 2022 +0000

    upstream: check for EINTR/EAGAIN failures in the rfd fast-path; caught
    
    by dtucker's minix3 vm :) ok dtucker@
    
    OpenBSD-Commit-ID: 2e2c895a3e82ef347aa6694394a76a438be91361
---
 channels.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/channels.c b/channels.c
index d662ff03..73e93c03 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.412 2022/01/22 00:45:31 djm Exp $ */
+/* $OpenBSD: channels.c,v 1.413 2022/02/17 10:58:27 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -1951,6 +1951,9 @@ channel_handle_rfd(struct ssh *ssh, Channel *c)
 		if (maxlen > avail)
 			maxlen = avail;
 		if ((r = sshbuf_read(c->rfd, c->input, maxlen, NULL)) != 0) {
+			if (errno == EINTR || (!force &&
+			    (errno == EAGAIN || errno == EWOULDBLOCK)))
+				return 1;
 			debug2("channel %d: read failed rfd %d maxlen %zu: %s",
 			    c->self, c->rfd, maxlen, ssh_err(r));
 			goto rfail;

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list