Path: blob/main/website/static/security/patches/EN-10:01/nfsreconnect.patch
18096 views
Index: sys/rpc/clnt_vc.c1===================================================================2--- sys/rpc/clnt_vc.c (revision 200583)3+++ sys/rpc/clnt_vc.c (working copy)4@@ -413,6 +413,22 @@ call_again:56cr->cr_xid = xid;7mtx_lock(&ct->ct_lock);8+ /*9+ * Check to see if the other end has already started to close down10+ * the connection. The upcall will have set ct_error.re_status11+ * to RPC_CANTRECV if this is the case.12+ * If the other end starts to close down the connection after this13+ * point, it will be detected later when cr_error is checked,14+ * since the request is in the ct_pending queue.15+ */16+ if (ct->ct_error.re_status == RPC_CANTRECV) {17+ if (errp != &ct->ct_error) {18+ errp->re_errno = ct->ct_error.re_errno;19+ errp->re_status = RPC_CANTRECV;20+ }21+ stat = RPC_CANTRECV;22+ goto out;23+ }24TAILQ_INSERT_TAIL(&ct->ct_pending, cr, cr_link);25mtx_unlock(&ct->ct_lock);26272829