linux-stable/net/sunrpc
NeilBrown 5364fe2992 SUNRPC/call_alloc: async tasks mustn't block waiting for memory
[ Upstream commit c487216bec ]

When memory is short, new worker threads cannot be created and we depend
on the minimum one rpciod thread to be able to handle everything.
So it must not block waiting for memory.

mempools are particularly a problem as memory can only be released back
to the mempool by an async rpc task running.  If all available
workqueue threads are waiting on the mempool, no thread is available to
return anything.

rpc_malloc() can block, and this might cause deadlocks.
So check RPC_IS_ASYNC(), rather than RPC_IS_SWAPPER() to determine if
blocking is acceptable.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-20 09:08:28 +02:00
..
auth_gss rpc: fix gss_svc_init cleanup on failure 2021-09-22 11:45:30 +02:00
xprtrdma SUNRPC/call_alloc: async tasks mustn't block waiting for memory 2022-04-20 09:08:28 +02:00
addr.c net: sunrpc: interpret the return value of kstrtou32 correctly 2021-01-23 15:48:44 +01:00
auth.c sched/headers: Prepare to remove <linux/cred.h> inclusion from <linux/sched.h> 2017-03-02 08:42:31 +01:00
auth_generic.c SUNRPC: Fix a bogus get/put in generic_key_to_expire() 2018-12-01 09:42:54 +01:00
auth_null.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
auth_unix.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
backchannel_rqst.c SUNRPC: Don't hold the transport lock when receiving backchannel data 2017-08-16 15:10:16 -04:00
cache.c sunrpc: fix crash when cache_head become valid before update 2019-12-17 20:40:00 +01:00
clnt.c net :sunrpc :clnt :Fix xps refcount imbalance on the error path 2019-07-21 09:04:29 +02:00
debugfs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig svcrdma: Introduce local rdma_rw API helpers 2017-04-25 17:25:55 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
netns.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rpc_pipe.c sunrpc: fixed rollback in rpc_gssd_dummy_populate() 2020-06-30 15:38:09 -04:00
rpcb_clnt.c SUNRPC: stop printk reading past end of string 2020-09-23 10:46:34 +02:00
sched.c SUNRPC/call_alloc: async tasks mustn't block waiting for memory 2022-04-20 09:08:28 +02:00
socklib.c
stats.c sunrpc: move pc_count out of struct svc_procinfo 2017-07-13 15:58:02 -04:00
sunrpc.h
sunrpc_syms.c
svc.c sunrpc: fix refcount leak for rpc auth modules 2021-03-24 11:05:01 +01:00
svc_xprt.c NFSD: Repair misuse of sv_lock in 5.10.16-rt30. 2021-03-24 11:05:00 +01:00
svcauth.c
svcauth_unix.c kernel: make groups_sort calling a responsibility group_info allocators 2017-12-20 10:10:18 +01:00
svcsock.c sunrpc: use-after-free in svc_process_common() 2019-01-16 22:07:13 +01:00
sysctl.c
timer.c
xdr.c SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment() 2020-06-30 15:38:09 -04:00
xprt.c SUNRPC: avoid race between mod_timer() and del_timer_sync() 2022-04-20 09:08:09 +02:00
xprtmultipath.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xprtsock.c SUNRPC: xprt_load_transport() needs to support the netid "rdma6" 2020-12-29 13:46:57 +01:00