linux_dsm_epyc7002/net/sunrpc/xprtrdma
Chuck Lever 35f71f3cbd xprtrdma: Fix XDRBUF_SPARSE_PAGES support
commit 15261b9126cd5bb2ad8521da49d8f5c042d904c7 upstream.

Olga K. observed that rpcrdma_marsh_req() allocates sparse pages
only when it has determined that a Reply chunk is necessary. There
are plenty of cases where no Reply chunk is needed, but the
XDRBUF_SPARSE_PAGES flag is set. The result would be a crash in
rpcrdma_inline_fixup() when it tries to copy parts of the received
Reply into a missing page.

To avoid crashing, handle sparse page allocation up front.

Until XATTR support was added, this issue did not appear often
because the only SPARSE_PAGES consumer always expected a reply large
enough to always require a Reply chunk.

Reported-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:54:15 +01:00
..
backchannel.c xprtrdma: kmalloc rpcrdma_ep separate from rpcrdma_xprt 2020-03-27 10:47:25 -04:00
frwr_ops.c xprtrdma: drop double zeroing 2020-09-21 12:15:25 -04:00
Makefile xprtrdma: Remove support for FMR memory registration 2019-01-02 12:05:17 -05:00
module.c SUNRPC: xprt_load_transport() needs to support the netid "rdma6" 2020-12-30 11:53:30 +01:00
rpc_rdma.c xprtrdma: Fix XDRBUF_SPARSE_PAGES support 2020-12-30 11:54:15 +01:00
svc_rdma_backchannel.c svcrdma: Record send_ctxt completion ID in trace_svcrdma_post_send() 2020-07-13 17:28:24 -04:00
svc_rdma_recvfrom.c svcrdma: Remove transport reference counting 2020-07-28 10:18:14 -04:00
svc_rdma_rw.c net: sunrpc: delete repeated words 2020-09-25 18:01:26 -04:00
svc_rdma_sendto.c svcrdma: fix bounce buffers for unaligned offsets and multiple pages 2020-10-16 15:15:04 -04:00
svc_rdma_transport.c svcrdma: CM event handler clean up 2020-07-28 10:18:15 -04:00
svc_rdma.c sysctl: pass kernel pointers to ->proc_handler 2020-04-27 02:07:40 -04:00
transport.c SUNRPC: xprt_load_transport() needs to support the netid "rdma6" 2020-12-30 11:53:30 +01:00
verbs.c NFS client bugfixes for Linux 5.9 2020-09-09 11:14:20 -07:00
xprt_rdma.h xprtrdma: Clean up disconnect 2020-06-22 09:34:35 -04:00