[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <81C11D6F-653D-4B14-A3A6-E6BB6FB5436D@vmware.com>
Date: Fri, 25 Aug 2017 22:02:57 +0000
From: Nadav Amit <namit@...are.com>
To: "mike.kravetz@...cle.com" <mike.kravetz@...cle.com>,
"ebiggers@...gle.com" <ebiggers@...gle.com>
CC: Andrew Morton <akpm@...ux-foundation.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Hugh Dickins <hughd@...gle.com>,
Minchan Kim <minchan@...nel.org>,
"rientjes@...gle.com" <rientjes@...gle.com>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
"mm-commits@...r.kernel.org" <mm-commits@...r.kernel.org>,
"open list:MEMORY MANAGEMENT" <linux-mm@...ck.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Michal Hocko <mhocko@...nel.org>,
"nyc@...omorphy.com" <nyc@...omorphy.com>
Subject: Re: + mm-madvise-fix-freeing-of-locked-page-with-madv_free.patch
added to -mm tree
Michal Hocko <mhocko@...nel.org> wrote:
> Hmm, I do not see this neither in linux-mm nor LKML. Strange
>
> On Wed 23-08-17 14:41:21, Andrew Morton wrote:
>> From: Eric Biggers <ebiggers@...gle.com>
>> Subject: mm/madvise.c: fix freeing of locked page with MADV_FREE
>>
>> If madvise(..., MADV_FREE) split a transparent hugepage, it called
>> put_page() before unlock_page(). This was wrong because put_page() can
>> free the page, e.g. if a concurrent madvise(..., MADV_DONTNEED) has
>> removed it from the memory mapping. put_page() then rightfully complained
>> about freeing a locked page.
>>
>> Fix this by moving the unlock_page() before put_page().
Quick grep shows that a similar flow (put_page() followed by an
unlock_page() ) also happens in hugetlbfs_fallocate(). Isn’t it a problem as
well?
Powered by blists - more mailing lists