Skip to content

Commit 9d82819

Browse files
author
Trond Myklebust
committed
SUNRPC: Handle low memory situations in call_status()
We need to handle ENFILE, ENOBUFS, and ENOMEM, because xprt_wake_pending_tasks() can be called with any one of these due to socket creation failures. Fixes: b61d59f ("SUNRPC: xs_tcp_connect_worker{4,6}: merge common code") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
1 parent d3c1503 commit 9d82819

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

net/sunrpc/clnt.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2367,6 +2367,11 @@ call_status(struct rpc_task *task)
23672367
case -EPIPE:
23682368
case -EAGAIN:
23692369
break;
2370+
case -ENFILE:
2371+
case -ENOBUFS:
2372+
case -ENOMEM:
2373+
rpc_delay(task, HZ>>2);
2374+
break;
23702375
case -EIO:
23712376
/* shutdown or soft timeout */
23722377
goto out_exit;

0 commit comments

Comments
 (0)