From: Chuhong Yuan <hslester96@gmail.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Jens Axboe <axboe@kernel.dk>,
xen-devel@lists.xenproject.org, linux-block@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] xen/blkback: Use refcount_t for refcount
Date: Fri, 9 Aug 2019 09:12:04 +0800 [thread overview]
Message-ID: <CANhBUQ1rSUPsg+XddCQ4B=JiSA8VV+YkdC-pmgY25hFnvwdFcw@mail.gmail.com> (raw)
In-Reply-To: <20190808133510.tre6twn764pv3e7m@Air-de-Roger>
On Thu, Aug 8, 2019 at 9:35 PM Roger Pau Monné <roger.pau@citrix.com> wrote:
>
> On Thu, Aug 08, 2019 at 09:11:00PM +0800, Chuhong Yuan wrote:
> > Reference counters are preferred to use refcount_t instead of
> > atomic_t.
> > This is because the implementation of refcount_t can prevent
> > overflows and detect possible use-after-free.
> > So convert atomic_t ref counters to refcount_t.
>
> Thanks!
>
> I think there are more reference counters in blkback than
> the one you fixed. There's also an inflight field in xen_blkif_ring,
> and a pendcnt in pending_req which look like possible candidates to
> switch to use refcount_t, have you looked into switching those two
> also?
>
I will switch those two in next version.
> Roger.
next prev parent reply other threads:[~2019-08-09 1:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-08 13:11 [PATCH 3/3] xen/blkback: Use refcount_t for refcount Chuhong Yuan
2019-08-08 13:35 ` Roger Pau Monné
2019-08-09 1:12 ` Chuhong Yuan [this message]
2019-08-13 6:10 ` Chuhong Yuan
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='CANhBUQ1rSUPsg+XddCQ4B=JiSA8VV+YkdC-pmgY25hFnvwdFcw@mail.gmail.com' \
--to=hslester96@gmail.com \
--cc=axboe@kernel.dk \
--cc=konrad.wilk@oracle.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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 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).