linux/net/sunrpc
NeilBrown eb07d5a4da SUNRPC: handle malloc failure in ->request_prepare
If ->request_prepare() detects an error, it sets ->rq_task->tk_status.
This is easy for callers to ignore.
The only caller is xprt_request_enqueue_receive() and it does ignore the
error, as does call_encode() which calls it.  This can result in a
request being queued to receive a reply without an allocated receive buffer.

So instead of setting rq_task->tk_status, return an error, and store in
->tk_status only in call_encode();

The call to xprt_request_enqueue_receive() is now earlier in
call_encode(), where the error can still be handled.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
2022-03-29 22:15:46 -04:00
..
auth_gss SUNRPC/auth: async tasks mustn't block waiting for memory 2022-03-13 12:59:35 -04:00
xprtrdma SUNRPC: improve 'swap' handling: scheduling and PF_MEMALLOC 2022-03-13 12:59:35 -04:00
addr.c nfsd: don't alloc under spinlock in rpc_parse_scope_id 2021-09-21 17:51:47 -04:00
auth_null.c SUNRPC: Add rpc_auth::au_ralign field 2019-02-14 11:48:36 -05:00
auth_unix.c SUNRPC: Fix unx_lookup_cred() allocation 2022-03-22 15:52:55 -04:00
auth.c NFS: discard NFS_RPC_SWAPFLAGS and RPC_TASK_ROOTCREDS 2022-03-13 12:59:35 -04:00
backchannel_rqst.c SUNRPC: Make the rpciod and xprtiod slab allocation modes consistent 2022-03-22 15:52:55 -04:00
cache.c proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
clnt.c SUNRPC: handle malloc failure in ->request_prepare 2022-03-29 22:15:46 -04:00
debugfs.c NFS Client Updates for Linux 5.15 2021-09-04 10:25:26 -07:00
fail.h SUNRPC: Server-side disconnect injection 2021-08-20 13:50:33 -04:00
Kconfig SUNRPC: remove RC4-HMAC-MD5 support from KerberosV 2020-09-11 14:39:15 +10:00
Makefile sunrpc: Create a sunrpc directory under /sys/kernel/ 2021-07-08 14:03:23 -04:00
netns.h
rpc_pipe.c fsnotify: fix fsnotify hooks in pseudo filesystems 2022-01-24 14:17:02 +01:00
rpcb_clnt.c SUNRPC: Make the rpciod and xprtiod slab allocation modes consistent 2022-03-22 15:52:55 -04:00
sched.c NFS: Fix memory allocation in rpc_alloc_task() 2022-03-22 15:52:55 -04:00
socklib.c SUNRPC: Make the rpciod and xprtiod slab allocation modes consistent 2022-03-22 15:52:55 -04:00
socklib.h SUNRPC: Refactor xs_sendpages() 2020-03-16 12:04:33 -04:00
stats.c proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
sunrpc_syms.c sunrpc: add IDs to multipath 2021-07-08 14:03:23 -04:00
sunrpc.h Replace HTTP links with HTTPS ones: NFS, SUNRPC, and LOCKD clients 2020-09-21 10:21:10 -04:00
svc_xprt.c Highlights: 2022-01-16 07:42:58 +02:00
svc.c lockd: use svc_set_num_threads() for thread start and stop 2021-12-13 13:42:58 -05:00
svcauth_unix.c SUNRPC: Set rq_auth_stat in the pg_authenticate() callout 2021-08-10 14:18:35 -04:00
svcauth.c SUNRPC: Add svc_rqst::rq_auth_stat 2021-08-10 14:18:35 -04:00
svcsock.c SUNRPC: fix ternary sign expansion bug in tracing 2021-04-22 11:02:28 -04:00
sysctl.c net/sunrpc: fix useless comparison in proc_do_xprt() 2020-11-08 16:28:25 -05:00
sysfs.c SUNRPC: Don't return error values in sysfs read of closed files 2022-03-25 13:24:12 -04:00
sysfs.h SUNRPC: take a xprt offline using sysfs 2021-07-08 14:03:24 -04:00
timer.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
xdr.c SUNRPC: xdr_stream_subsegment() must handle non-zero page_bases 2021-10-02 16:10:01 -04:00
xprt.c SUNRPC: handle malloc failure in ->request_prepare 2022-03-29 22:15:46 -04:00
xprtmultipath.c SUNRPC keep track of number of transports to unique addresses 2021-08-27 16:36:53 -04:00
xprtsock.c SUNRPC: handle malloc failure in ->request_prepare 2022-03-29 22:15:46 -04:00