]> git.baikalelectronics.ru Git - kernel.git/commit
xprtrdma: Add xdr_init_decode to rpcrdma_reply_handler()
authorChuck Lever <chuck.lever@oracle.com>
Thu, 3 Aug 2017 18:30:03 +0000 (14:30 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 8 Aug 2017 14:52:00 +0000 (10:52 -0400)
commitae95b136ff8254fa38e6cba9bb744c62e1bcabab
tree77c2d789cacf667f54cd966b7727bb13cf1e7272
parent0da7595a71b649a8014d245ec328644fc54148fd
xprtrdma: Add xdr_init_decode to rpcrdma_reply_handler()

Transport header decoding deals with untrusted input data, therefore
decoding this header needs to be hardened.

Adopt the same infrastructure that is used when XDR decoding NFS
replies. This is slightly more CPU-intensive than the replaced code,
but we're not adding new atomics, locking, or context switches. The
cost is manageable.

Start by initializing an xdr_stream in rpcrdma_reply_handler().

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/rpc_rdma.c
net/sunrpc/xprtrdma/verbs.c
net/sunrpc/xprtrdma/xprt_rdma.h