Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "tanxin.ctf@gmail.com" <tanxin.ctf@gmail.com>,
	"xiyuyang19@fudan.edu.cn" <xiyuyang19@fudan.edu.cn>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"chuck.lever@oracle.com" <chuck.lever@oracle.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kolga@netapp.com" <kolga@netapp.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"bfields@fieldses.org" <bfields@fieldses.org>,
	"anna.schumaker@netapp.com" <anna.schumaker@netapp.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Cc: "yuanxzhang@fudan.edu.cn" <yuanxzhang@fudan.edu.cn>
Subject: Re: [PATCH] SUNRPC: Convert from atomic_t to refcount_t on rpc_clnt->cl_count
Date: Sat, 17 Jul 2021 14:43:26 +0000	[thread overview]
Message-ID: <1f12b3569565fa8590b45cc2fbe7c176ca7c5184.camel@hammerspace.com> (raw)
In-Reply-To: <1626517112-42831-1-git-send-email-xiyuyang19@fudan.edu.cn>

On Sat, 2021-07-17 at 18:18 +0800, Xiyu Yang wrote:
> refcount_t type and corresponding API can protect refcounters from
> accidental underflow and overflow and further use-after-free
> situations.
> 

Have you tested this patch? As far as I remember, the reason why we
never converted is that refcount_inc() gets upset and WARNs when you
bump a zero refcount, like we do very much on purpose in
rpc_free_auth(). Is that no longer the case?


-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com



  reply	other threads:[~2021-07-17 14:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-17 10:18 Xiyu Yang
2021-07-17 14:43 ` Trond Myklebust [this message]
2021-07-17 16:32   ` Xiyu Yang
2021-07-18 10:47   ` Leon Romanovsky

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=1f12b3569565fa8590b45cc2fbe7c176ca7c5184.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=anna.schumaker@netapp.com \
    --cc=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=davem@davemloft.net \
    --cc=kolga@netapp.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tanxin.ctf@gmail.com \
    --cc=xiyuyang19@fudan.edu.cn \
    --cc=yuanxzhang@fudan.edu.cn \
    --subject='Re: [PATCH] SUNRPC: Convert from atomic_t to refcount_t on rpc_clnt->cl_count' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).