Skip to content

Commit 062b829

Browse files
Trond MyklebustJ. Bruce Fields
authored andcommitted
SUNRPC: Fix XPT_BUSY flag leakage in svc_handle_xprt()...
If the attempt to reserve a slot fails, we currently leak the XPT_BUSY flag on the socket. Among other things, this make it impossible to close the socket. Fixes: 82011c8 ("SUNRPC: Move svc_xprt_received() call sites") Signed-off-by: Trond Myklebust <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
1 parent e22ce8e commit 062b829

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/sunrpc/svc_xprt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,8 @@ static int svc_handle_xprt(struct svc_rqst *rqstp, struct svc_xprt *xprt)
835835
rqstp->rq_stime = ktime_get();
836836
rqstp->rq_reserved = serv->sv_max_mesg;
837837
atomic_add(rqstp->rq_reserved, &xprt->xpt_reserved);
838-
}
838+
} else
839+
svc_xprt_received(xprt);
839840
out:
840841
trace_svc_handle_xprt(xprt, len);
841842
return len;

0 commit comments

Comments
 (0)