]> git.baikalelectronics.ru Git - kernel.git/commit
svcrdma: Use correct XID in error replies
authorChuck Lever <chuck.lever@oracle.com>
Tue, 1 Mar 2016 18:06:47 +0000 (13:06 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 1 Mar 2016 21:06:39 +0000 (13:06 -0800)
commit391e58fb24b3ca47e0fa201abca8fd184d99971f
tree8a4114f5dcdffce6166fbf77eded7b2638d4c2ee
parent2033ba1d09264f6c8ef8fb6d1d1b64bee5e6399e
svcrdma: Use correct XID in error replies

When constructing an error reply, svc_rdma_xdr_encode_error()
needs to view the client's request message so it can get the
failing request's XID.

svc_rdma_xdr_decode_req() is supposed to return a pointer to the
client's request header. But if it fails to decode the client's
message (and thus an error reply is needed) it does not return the
pointer. The server then sends a bogus XID in the error reply.

Instead, unconditionally generate the pointer to the client's header
in svc_rdma_recvfrom(), and pass that pointer to both functions.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Devesh Sharma <devesh.sharma@broadcom.com>
Tested-by: Devesh Sharma <devesh.sharma@broadcom.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
include/linux/sunrpc/svc_rdma.h
net/sunrpc/xprtrdma/svc_rdma_marshal.c
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c