From: Chuck Lever Date: Sat, 9 May 2020 18:07:13 +0000 (-0400) Subject: SUNRPC: Signalled ASYNC tasks need to exit X-Git-Tag: v5.4.42~67 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6259b1c1bca54a5c72d8c5b331c42a255d351cdb;p=platform%2Fkernel%2Flinux-rpi.git SUNRPC: Signalled ASYNC tasks need to exit [ Upstream commit ce99aa62e1eb793e259d023c7f6ccb7c4879917b ] Ensure that signalled ASYNC rpc_tasks exit immediately instead of spinning until a timeout (or forever). To avoid checking for the signal flag on every scheduler iteration, the check is instead introduced in the client's finite state machine. Signed-off-by: Chuck Lever Fixes: ae67bd3821bb ("SUNRPC: Fix up task signalling") Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin --- diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index f7f7856..f1088ca 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -2422,6 +2422,11 @@ rpc_check_timeout(struct rpc_task *task) { struct rpc_clnt *clnt = task->tk_client; + if (RPC_SIGNALLED(task)) { + rpc_call_rpcerror(task, -ERESTARTSYS); + return; + } + if (xprt_adjust_timeout(task->tk_rqstp) == 0) return;