All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever III <chuck.lever@oracle.com>
To: Trond Myklebust <trondmy@gmail.com>, Bruce Fields <bfields@redhat.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] SUNRPC: Fix XPT_BUSY flag leakage in svc_handle_xprt()...
Date: Wed, 25 Aug 2021 19:51:47 +0000	[thread overview]
Message-ID: <86716FAD-E791-4F89-BED3-9AC934A281E7@oracle.com> (raw)
In-Reply-To: <20210825193314.354079-1-trond.myklebust@hammerspace.com>



> On Aug 25, 2021, at 3:33 PM, trondmy@gmail.com wrote:
> 
> From: Trond Myklebust <trond.myklebust@hammerspace.com>
> 
> 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: 82011c80b3ec ("SUNRPC: Move svc_xprt_received() call sites")
> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
> ---
> net/sunrpc/svc_xprt.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
> index 5f0d33ca4bdb..b3cff4077899 100644
> --- a/net/sunrpc/svc_xprt.c
> +++ b/net/sunrpc/svc_xprt.c
> @@ -975,7 +975,8 @@ static int svc_handle_xprt(struct svc_rqst *rqstp, struct svc_xprt *xprt)
> 		rqstp->rq_stime = ktime_get();
> 		rqstp->rq_reserved = serv->sv_max_mesg;
> 		atomic_add(rqstp->rq_reserved, &xprt->xpt_reserved);
> -	}
> +	} else
> +		svc_xprt_received(xprt);
> out:
> 	trace_svc_handle_xprt(xprt, len);
> 	return len;
> -- 
> 2.31.1

Looks correct. Bruce, perhaps you should pull this for 5.14-rc.
Linus says he expects to release 5.14-final this Sunday, fyi.

--
Chuck Lever




  reply	other threads:[~2021-08-25 19:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 19:33 [PATCH] SUNRPC: Fix XPT_BUSY flag leakage in svc_handle_xprt() trondmy
2021-08-25 19:51 ` Chuck Lever III [this message]
2021-08-25 20:37   ` Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86716FAD-E791-4F89-BED3-9AC934A281E7@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=bfields@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.