SUNRPC: remove printk when back channel request not found
If the client interface is down, or there is a network partition between the client and server that prevents the callback request to reach the client, TCP on the server will keep re-transmitting the callback for about ~9 minutes before giving up and closing the connection. If the connection between the client and the server is re-established before the connection is closed and after the callback timed out (9 secs) then the re-transmitted callback request will arrive at the client. When the server receives the reply of the callback, receive_cb_reply prints the "Got unrecognized reply..." message in the system log since the callback request was already removed from the server xprt's recv_queue. Even though this scenario has no effect on the server operation, a malfunctioning or malicious client can fill up the server's system log. Signed-off-by: Dai Ngo <dai.ngo@oracle.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
@@ -1049,18 +1049,14 @@ static int receive_cb_reply(struct svc_sock *svsk, struct svc_rqst *rqstp)
|
|||||||
struct rpc_rqst *req = NULL;
|
struct rpc_rqst *req = NULL;
|
||||||
struct kvec *src, *dst;
|
struct kvec *src, *dst;
|
||||||
__be32 *p = (__be32 *)rqstp->rq_arg.head[0].iov_base;
|
__be32 *p = (__be32 *)rqstp->rq_arg.head[0].iov_base;
|
||||||
__be32 xid;
|
__be32 xid = *p;
|
||||||
__be32 calldir;
|
|
||||||
|
|
||||||
xid = *p++;
|
|
||||||
calldir = *p;
|
|
||||||
|
|
||||||
if (!bc_xprt)
|
if (!bc_xprt)
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
spin_lock(&bc_xprt->queue_lock);
|
spin_lock(&bc_xprt->queue_lock);
|
||||||
req = xprt_lookup_rqst(bc_xprt, xid);
|
req = xprt_lookup_rqst(bc_xprt, xid);
|
||||||
if (!req)
|
if (!req)
|
||||||
goto unlock_notfound;
|
goto unlock_eagain;
|
||||||
|
|
||||||
memcpy(&req->rq_private_buf, &req->rq_rcv_buf, sizeof(struct xdr_buf));
|
memcpy(&req->rq_private_buf, &req->rq_rcv_buf, sizeof(struct xdr_buf));
|
||||||
/*
|
/*
|
||||||
@@ -1077,12 +1073,6 @@ static int receive_cb_reply(struct svc_sock *svsk, struct svc_rqst *rqstp)
|
|||||||
rqstp->rq_arg.len = 0;
|
rqstp->rq_arg.len = 0;
|
||||||
spin_unlock(&bc_xprt->queue_lock);
|
spin_unlock(&bc_xprt->queue_lock);
|
||||||
return 0;
|
return 0;
|
||||||
unlock_notfound:
|
|
||||||
printk(KERN_NOTICE
|
|
||||||
"%s: Got unrecognized reply: "
|
|
||||||
"calldir 0x%x xpt_bc_xprt %p xid %08x\n",
|
|
||||||
__func__, ntohl(calldir),
|
|
||||||
bc_xprt, ntohl(xid));
|
|
||||||
unlock_eagain:
|
unlock_eagain:
|
||||||
spin_unlock(&bc_xprt->queue_lock);
|
spin_unlock(&bc_xprt->queue_lock);
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
|
Reference in New Issue
Block a user