From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <1506044061.21121.70.camel@redhat.com> Subject: Re: [PATCH 1/2] mm: avoid marking swap cached page as lazyfree From: Rik van Riel To: Shaohua Li , linux-mm@kvack.org Cc: Artem Savkov , Kernel-team@fb.com, Shaohua Li , stable@vger.kernel.org, Johannes Weiner , Michal Hocko , Hillf Danton , Minchan Kim , Hugh Dickins , Mel Gorman , Andrew Morton Date: Thu, 21 Sep 2017 21:34:21 -0400 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: On Thu, 2017-09-21 at 13:27 -0700, Shaohua Li wrote: > From: Shaohua Li > > MADV_FREE clears pte dirty bit and then marks the page lazyfree > (clear > SwapBacked). There is no lock to prevent the page is added to swap > cache > between these two steps by page reclaim. If the page is added to swap > cache, marking the page lazyfree will confuse page fault if the page > is > reclaimed and refault. > > Reported-and-tested-y: Artem Savkov > Fix: 802a3a92ad7a(mm: reclaim MADV_FREE pages) > Signed-off-by: Shaohua Li > Cc: stable@vger.kernel.org > Cc: Johannes Weiner > Cc: Michal Hocko > Cc: Hillf Danton > Cc: Minchan Kim > Cc: Hugh Dickins > Cc: Rik van Riel > Cc: Mel Gorman > Cc: Andrew Morton > Reviewed-by: Rik van Riel -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org