lkml.org 
[lkml]   [2022]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] hugetlb: take hugetlb vma_lock when clearing vma_lock->vma pointer
From
Date
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


\
 
 \ /
  Last update: 2022-10-15 03:33    [W:2.291 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site