Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gregory Price <gourry@gourry.net>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com,  akpm@linux-foundation.org, ziy@nvidia.com,
	joshua.hahnjy@gmail.com, rakie.kim@sk.com,
	 ying.huang@linux.alibaba.com, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] mm/mempolicy: convert mempolicy refcnt to refcount_t
Date: Fri, 16 Oct 2026 09:17:42 -0400	[thread overview]
Message-ID: <atIj60f_iMYCl7I6@gourry-fedora-PF4VCD3F> (raw)
In-Reply-To: <b64e2b5d-d880-4ea9-ab2c-c04a0963427f@kernel.org>

On Fri, Oct 16, 2026 at 09:54:33AM +0200, David Hildenbrand (Arm) wrote:
> On 10/16/26 01:13, Gregory Price (Meta) wrote:
> > struct mempolicy uses an atomic_t as a pure reference counter.
> > 
> > Convert it to refcount_t so that overflow and underflow are caught
> > by the refcount saturation checks.
> > 
> > This silences the atomic_as_refcounter.cocci warning, which started
> > matching __mpol_put() when it switched kmem_cache_free() to kfree_rcu().
> > 
> > No functional change for correct callers.
> > 
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202610061946.Bx22ZFrw-lkp@intel.com/
> > Signed-off-by: Gregory Price (Meta) <gourry@gourry.net>
> > ---
> 
> Wondering if we want a Fixes? If this only fixes cocci warnings I guess not.
>

That was my thought.

> Acked-by: David Hildenbrand (Arm) <david@kernel.org>


      reply	other threads:[~2026-10-16 13:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15 23:13 [PATCH] mm/mempolicy: convert mempolicy refcnt to refcount_t Gregory Price (Meta)
2026-10-15 23:46 ` SJ Park
2026-10-16  7:54 ` David Hildenbrand (Arm)
2026-10-16 13:17   ` Gregory Price [this message]

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=atIj60f_iMYCl7I6@gourry-fedora-PF4VCD3F \
    --to=gourry@gourry.net \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=joshua.hahnjy@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=rakie.kim@sk.com \
    --cc=ying.huang@linux.alibaba.com \
    --cc=ziy@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox