| Summary: | [rpc] amd + NFS reconnect = ICMP storm + unkillable process + hung amd mount. | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Artem Belevich <art> |
| Component: | kern | Assignee: | Artem Belevich <art> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 8.2-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Artem Belevich
2011-08-26 07:10:08 UTC
Responsible Changed From-To: freebsd-bugs->art Mine. Author: art Date: Sun Aug 28 18:09:17 2011 New Revision: 225234 URL: http://svn.freebsd.org/changeset/base/225234 Log: Make sure RPC calls over UDP return RPC_INTR status is the process has been interrupted in a restartable syscall. Otherwise we could end up in an (almost) endless loop in clnt_reconnect_call(). PR: kern/160198 Reviewed by: rmacklem Approved by: re (kib), avg (mentor) MFC after: 1 week Modified: head/sys/rpc/clnt_dg.c Modified: head/sys/rpc/clnt_dg.c ============================================================================== --- head/sys/rpc/clnt_dg.c Sun Aug 28 16:11:24 2011 (r225233) +++ head/sys/rpc/clnt_dg.c Sun Aug 28 18:09:17 2011 (r225234) @@ -467,7 +467,10 @@ send_again: cu->cu_waitflag, "rpccwnd", 0); if (error) { errp->re_errno = error; - errp->re_status = stat = RPC_CANTSEND; + if (error == EINTR || error == ERESTART) + errp->re_status = stat = RPC_INTR; + else + errp->re_status = stat = RPC_CANTSEND; goto out; } } @@ -636,7 +639,7 @@ get_reply: */ if (error != EWOULDBLOCK) { errp->re_errno = error; - if (error == EINTR) + if (error == EINTR || error == ERESTART) errp->re_status = stat = RPC_INTR; else errp->re_status = stat = RPC_CANTRECV; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" Author: art Date: Mon Sep 5 06:54:13 2011 New Revision: 225384 URL: http://svn.freebsd.org/changeset/base/225384 Log: MFC r225234: Make sure RPC calls over UDP return RPC_INTR status if the process has been interrupted in a restartable syscall. Otherwise we could end up in an (almost) endless loop in clnt_reconnect_call(). PR: kern/160198 Reviewed by: rmacklem Approved by: avg (mentor) Modified: stable/8/sys/rpc/clnt_dg.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/rpc/clnt_dg.c ============================================================================== --- stable/8/sys/rpc/clnt_dg.c Mon Sep 5 06:11:17 2011 (r225383) +++ stable/8/sys/rpc/clnt_dg.c Mon Sep 5 06:54:13 2011 (r225384) @@ -467,7 +467,10 @@ send_again: cu->cu_waitflag, "rpccwnd", 0); if (error) { errp->re_errno = error; - errp->re_status = stat = RPC_CANTSEND; + if (error == EINTR || error == ERESTART) + errp->re_status = stat = RPC_INTR; + else + errp->re_status = stat = RPC_CANTSEND; goto out; } } @@ -636,7 +639,7 @@ get_reply: */ if (error != EWOULDBLOCK) { errp->re_errno = error; - if (error == EINTR) + if (error == EINTR || error == ERESTART) errp->re_status = stat = RPC_INTR; else errp->re_status = stat = RPC_CANTRECV; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" State Changed From-To: open->closed Fix committed to head and MFC'ed to -8. |