LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Cc: Joerg Roedel <joro@8bytes.org>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	yuanxzhang@fudan.edu.cn, Xin Tan <tanxin.ctf@gmail.com>
Subject: Re: [PATCH] iommu/amd: Convert from atomic_t to refcount_t on device_state->count
Date: Mon, 19 Jul 2021 10:07:54 +0100	[thread overview]
Message-ID: <20210719090754.GB6221@willie-the-truck> (raw)
In-Reply-To: <1626674437-56007-1-git-send-email-xiyuyang19@fudan.edu.cn>

On Mon, Jul 19, 2021 at 02:00:37PM +0800, Xiyu Yang wrote:
> refcount_t type and corresponding API can protect refcounters from
> accidental underflow and overflow and further use-after-free situations.
> 
> Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
> Signed-off-by: Xin Tan <tanxin.ctf@gmail.com>
> ---
>  drivers/iommu/amd/iommu_v2.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)

Can pasid_state::count be converted similarly?

Will

  reply	other threads:[~2021-07-19  9:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19  6:00 Xiyu Yang
2021-07-19  9:07 ` Will Deacon [this message]
2021-07-22 19:33 ` Suthikulpanit, Suravee

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=20210719090754.GB6221@willie-the-truck \
    --to=will@kernel.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tanxin.ctf@gmail.com \
    --cc=xiyuyang19@fudan.edu.cn \
    --cc=yuanxzhang@fudan.edu.cn \
    --subject='Re: [PATCH] iommu/amd: Convert from atomic_t to refcount_t on device_state->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).