]> git.baikalelectronics.ru Git - kernel.git/commit
svcrdma: Improve Write chunk sanity checking
authorChuck Lever <chuck.lever@oracle.com>
Fri, 23 Jun 2017 21:17:52 +0000 (17:17 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 28 Jun 2017 18:21:44 +0000 (14:21 -0400)
commit64a86ac96305518f95b5ff70a676e4078fe06a9d
treed8a0a6176ff16fe85534b2a67e9233bcef2b2bd7
parentc2e9f5411400a24a6adb2225cfac337c0be89983
svcrdma: Improve Write chunk sanity checking

Identify malformed transport headers and unsupported chunk
combinations as early as possible.

- Reject RPC-over-RDMA messages that contain more than one Write
chunk, since this implementation does not support more than one per
message.

- Ensure that segment lengths are not crazy.

- Ensure that the chunk's segment count is not crazy.

With a 1KB inline threshold, the largest number of Write segments
that can be conveyed is about 60 (for a RDMA_NOMSG Reply message).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c