linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Kravetz <mike.kravetz@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Bui Quang Minh <minhquangbui99@gmail.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>, Michal Hocko <mhocko@suse.com>,
	Muchun Song <songmuchun@bytedance.com>,
	Mina Almasry <almasrymina@google.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] hugetlb: fix hugetlb cgroup refcounting during mremap
Date: Mon, 15 Nov 2021 15:25:23 -0800	[thread overview]
Message-ID: <a2b26f56-de7a-2192-f6b3-bf80d598f725@oracle.com> (raw)
In-Reply-To: <20211115131633.81e1879e36aed4a0290e6f0c@linux-foundation.org>

Subject:   Re: [PATCH] hugetlb: fix hugetlb cgroup refcounting during mremap

To:        Andrew Morton <akpm@linux-foundation.org>, Bui Quang Minh <minhquangbui99@gmail.com>

Cc:        Miaohe Lin <linmiaohe@huawei.com>, Michal Hocko <mhocko@suse.com>, Muchun Song <songmuchun@bytedance.com>, Mina Almasry <almasrymina@google.com>, linux-kernel@vger.kernel.org, linux-mm@kvack.org

Bcc:       

-=-=-=-=-=-=-=-=-=# Don't remove this line #=-=-=-=-=-=-=-=-=-

On 11/15/21 1:16 PM, Andrew Morton wrote:

> On Sat, 13 Nov 2021 22:44:10 +0700 Bui Quang Minh <minhquangbui99@gmail.com> wrote:

> 

>> When hugetlb_vm_op_open() is called during copy_vma(), we may take the

>> reference to resv_map->css. Later, when clearing the reservation pointer

>> of old_vma after transferring it to new_vma, we forget to drop the

>> reference to resv_map->css. This leads to a reference leak of css.

>>

>> Fixes this by adding a check to drop reservation css  reference in

>> clear_vma_resv_huge_pages()



Good catch!  Sorry I missed this in my review.



Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com



> Thanks.  I added cc:stable to this (550a7d60bd5e35a was merged a year

> ago) and I've queued it for 5.16-rc2, pending suitable reviewer feedback.



I may be confused, but 550a7d60bd5e35a was just merged in 5.16-rc1 so

no need for cc:stable.

-- 

Mike Kravetz



      parent reply	other threads:[~2021-11-15 23:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-13 15:44 Bui Quang Minh
2021-11-15 21:16 ` Andrew Morton
2021-11-15 22:39   ` Mina Almasry
2021-11-15 23:25   ` Mike Kravetz [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=a2b26f56-de7a-2192-f6b3-bf80d598f725@oracle.com \
    --to=mike.kravetz@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=almasrymina@google.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=minhquangbui99@gmail.com \
    --cc=songmuchun@bytedance.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