[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160609035108.GD655@swordfish>
Date: Thu, 9 Jun 2016 12:51:08 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Ebru Akagunduz <ebru.akagunduz@...il.com>,
akpm@...ux-foundation.org, sergey.senozhatsky.work@...il.com,
mhocko@...nel.org, kirill.shutemov@...ux.intel.com,
sfr@...b.auug.org.au, linux-mm@...ck.org,
linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
riel@...hat.com, aarcange@...hat.com
Subject: Re: [PATCH] mm, thp: fix locking inconsistency in collapse_huge_page
On (06/06/16 15:05), Vlastimil Babka wrote:
[..]
> I think this does fix the inconsistency, thanks.
>
> But looking at collapse_huge_page() as of latest -next, I wonder if there's
> another problem:
>
> pmd = mm_find_pmd(mm, address);
> ...
> up_read(&mm->mmap_sem);
> down_write(&mm->mmap_sem);
> hugepage_vma_revalidate(mm, address);
> ...
> pte = pte_offset_map(pmd, address);
>
> What guarantees that 'pmd' is still valid?
the same question applied to __collapse_huge_page_swapin(), I think.
__collapse_huge_page_swapin(pmd)
pte = pte_offset_map(pmd, address);
do_swap_page(mm, vma, _address, pte, pmd...)
up_read(&mm->mmap_sem);
down_read(&mm->mmap_sem);
pte = pte_offset_map(pmd, _address);
-ss
Powered by blists - more mailing lists