SUNRPC: svc_tcp_sendmsg() should handle errors from xdr_alloc_bvec()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 7 Apr 2022 18:10:23 +0000 (14:10 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 18:59:20 +0000 (20:59 +0200)
commit3fd9be3ec5c8ff0f052edee2a6fe127f5457ee7c
tree3ecb37e3a39544a73c08f5cd3ce01a572f403ad4
parent3b32dda29f994f036de528c07221fa72ba721f1c
SUNRPC: svc_tcp_sendmsg() should handle errors from xdr_alloc_bvec()

[ Upstream commit b056fa070814897be32d83b079dbc311375588e7 ]

The allocation is done with GFP_KERNEL, but it could still fail in a low
memory situation.

Fixes: 4a85a6a3320b ("SUNRPC: Handle TCP socket sends with kernel_sendpage() again")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sunrpc/svcsock.c