linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Miaohe Lin <linmiaohe@huawei.com>
To: Mike Kravetz <mike.kravetz@oracle.com>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>
Cc: Muchun Song <songmuchun@bytedance.com>,
	David Hildenbrand <david@redhat.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	Michal Hocko <mhocko@suse.com>, Peter Xu <peterx@redhat.com>,
	Naoya Horiguchi <naoya.horiguchi@linux.dev>,
	"Aneesh Kumar K . V" <aneesh.kumar@linux.vnet.ibm.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Prakash Sangappa <prakash.sangappa@oracle.com>,
	James Houghton <jthoughton@google.com>,
	Mina Almasry <almasrymina@google.com>,
	Pasha Tatashin <pasha.tatashin@soleen.com>,
	Axel Rasmussen <axelrasmussen@google.com>,
	Ray Fucillo <Ray.Fucillo@intersystems.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/3] hugetlb: take hugetlb vma_lock when clearing vma_lock->vma pointer
Date: Sat, 15 Oct 2022 09:32:45 +0800	[thread overview]
Message-ID: <6b2d8b41-1989-b28a-d558-3423432848fe@huawei.com> (raw)
In-Reply-To: <Yz5L1uxQYR1VqFtJ@monkey>

On 2022/10/6 11:30, Mike Kravetz wrote:
> To address build issues:
> 
> 
>>From b6d359f77d32c7734fe4f00806a0ed1e99925534 Mon Sep 17 00:00:00 2001
> From: Mike Kravetz <mike.kravetz@oracle.com>
> Date: Wed, 5 Oct 2022 20:26:19 -0700
> Subject: [PATCH 2/3] hugetlb: take hugetlb vma_lock when clearing
>  vma_lock->vma pointer
> 
> hugetlb file truncation/hole punch code may need to back out and take
> locks in order in the routine hugetlb_unmap_file_folio().  This code
> could race with vma freeing as pointed out in [1] and result in
> accessing a stale vma pointer.  To address this, take the vma_lock when
> clearing the vma_lock->vma pointer.
> 
> [1] https://lore.kernel.org/linux-mm/01f10195-7088-4462-6def-909549c75ef4@huawei.com/
> 
> Fixes: "hugetlb: use new vma_lock for pmd sharing synchronization"
> Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>

This patch looks good to me. Thanks.

Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>

Thanks,
Miaohe Lin




  reply	other threads:[~2022-10-15  1:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-05  1:17 [PATCH 0/3] hugetlb: fixes for new vma lock series Mike Kravetz
2022-10-05  1:17 ` [PATCH 1/3] hugetlb: fix vma lock handling during split vma and range unmapping Mike Kravetz
2022-10-15  1:25   ` Miaohe Lin
2022-10-18  2:56     ` Mike Kravetz
2022-10-18  6:25       ` Miaohe Lin
2022-10-05  1:17 ` [PATCH 2/3] hugetlb: take hugetlb vma_lock when clearing vma_lock->vma pointer Mike Kravetz
2022-10-05  3:48   ` kernel test robot
2022-10-05  6:58   ` kernel test robot
2022-10-06  3:30   ` Mike Kravetz
2022-10-15  1:32     ` Miaohe Lin [this message]
2022-10-05  1:17 ` [PATCH 3/3] hugetlb: allocate vma lock for all sharable vmas Mike Kravetz
2022-10-15  1:40   ` Miaohe Lin

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=6b2d8b41-1989-b28a-d558-3423432848fe@huawei.com \
    --to=linmiaohe@huawei.com \
    --cc=Ray.Fucillo@intersystems.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=almasrymina@google.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=axelrasmussen@google.com \
    --cc=dave@stgolabs.net \
    --cc=david@redhat.com \
    --cc=jthoughton@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=mike.kravetz@oracle.com \
    --cc=naoya.horiguchi@linux.dev \
    --cc=pasha.tatashin@soleen.com \
    --cc=peterx@redhat.com \
    --cc=prakash.sangappa@oracle.com \
    --cc=songmuchun@bytedance.com \
    --cc=svens@linux.ibm.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