[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yzt+EwJdLr0j9VwH@x1n>
Date: Mon, 3 Oct 2022 20:28:03 -0400
From: Peter Xu <peterx@...hat.com>
To: Mike Kravetz <mike.kravetz@...cle.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Andrea Arcangeli <aarcange@...hat.com>,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
David Hildenbrand <david@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Axel Rasmussen <axelrasmussen@...gle.com>,
Nadav Amit <nadav.amit@...il.com>
Subject: Re: [PATCH 1/3] mm/hugetlb: Fix race condition of uffd missing/minor
handling
On Mon, Oct 03, 2022 at 02:45:47PM -0700, Mike Kravetz wrote:
> This also explains why the new locking exposes the race.
> hugetlb_change_protection needs to take the i_mmap_sema in write mode because
> it could unshare pmds. Previously, hugetlb page faults took i_mmap_sema in
> read mode so this race could not happen.
Makes sense, thanks for explaining.
--
Peter Xu
Powered by blists - more mailing lists