All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Benjamin Coddington" <bcodding@redhat.com>
To: trondmy@kernel.org
Cc: "Xiyu Yang" <xiyuyang19@fudan.edu.cn>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] SUNRPC: Convert rpc_client refcount to use refcount_t
Date: Mon, 19 Jul 2021 08:01:25 -0400	[thread overview]
Message-ID: <6AF75462-495E-4B63-9A3E-C9639C45C1F2@redhat.com> (raw)
In-Reply-To: <20210717172052.232420-1-trondmy@kernel.org>

Hi Trond,

On 17 Jul 2021, at 13:20, trondmy@kernel.org wrote:

> @@ -943,7 +941,7 @@ rpc_release_client(struct rpc_clnt *clnt)
>  	do {
>  		if (list_empty(&clnt->cl_tasks))
>  			wake_up(&destroy_wait);
> -		if (!atomic_dec_and_test(&clnt->cl_count))
> +		if (refcount_dec_not_one(&clnt->cl_count))

I guess we're not worried about extra calls racing into rpc_free_auth?

.. hmm, it looks like current code can do that already since we're bumping the
ref up again.  Seems like we could end up in rpcauth_release twice with
an underflow on au_count.

Ben


  reply	other threads:[~2021-07-19 12:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-17 17:20 [PATCH] SUNRPC: Convert rpc_client refcount to use refcount_t trondmy
2021-07-19 12:01 ` Benjamin Coddington [this message]
2021-07-19 12:07   ` Trond Myklebust
2021-07-19 12:27     ` Benjamin Coddington
2021-07-26 12:01 trondmy

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=6AF75462-495E-4B63-9A3E-C9639C45C1F2@redhat.com \
    --to=bcodding@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@kernel.org \
    --cc=xiyuyang19@fudan.edu.cn \
    /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.