From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751269AbdH1UiC (ORCPT ); Mon, 28 Aug 2017 16:38:02 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:34550 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbdH1UiB (ORCPT ); Mon, 28 Aug 2017 16:38:01 -0400 X-Google-Smtp-Source: ADKCNb66WeZ1ZCyZ3KRz4D7KZo3F43n9Dzfmh0LBS49rU+dfGIQjgvjNzjiOHHIw0PvYPcuUC4NUsQ== Date: Mon, 28 Aug 2017 13:37:58 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Mel Gorman cc: Andrew Morton , "Hansen, Dave" , "Luck, Tony" , Linux MM , LKML Subject: Re: [PATCH] mm, madvise: Ensure poisoned pages are removed from per-cpu lists In-Reply-To: <20170828133414.7qro57jbepdcyz5x@techsingularity.net> Message-ID: References: <20170828133414.7qro57jbepdcyz5x@techsingularity.net> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 Aug 2017, Mel Gorman wrote: > Wendy Wang reported off-list that a RAS HWPOISON-SOFT test case failed and > bisected it to the commit 479f854a207c ("mm, page_alloc: defer debugging > checks of pages allocated from the PCP"). The problem is that a page that > was poisoned with madvise() is reused. The commit removed a check that > would trigger if DEBUG_VM was enabled but re-enabling the check only > fixes the problem as a side-effect by printing a bad_page warning and > recovering. > > The root of the problem is that a madvise() can leave a poisoned on > the per-cpu list. This patch drains all per-cpu lists after pages are > poisoned so that they will not be reused. Wendy reports that the test case > in question passes with this patch applied. While this could be done in > a targeted fashion, it is over-complicated for such a rare operation. > > Fixes: 479f854a207c ("mm, page_alloc: defer debugging checks of pages allocated from the PCP") > Reported-and-tested-by: Wang, Wendy > Cc: stable@kernel.org > Signed-off-by: Mel Gorman Acked-by: David Rientjes