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
This commit is contained in:
Artem Belevich 2011-08-28 18:09:17 +00:00
parent c4a2a39004
commit fa3db771d2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=225234

View File

@ -467,7 +467,10 @@ clnt_dg_call(
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 @@ clnt_dg_call(
*/
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;