From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753385AbcERODn (ORCPT ); Wed, 18 May 2016 10:03:43 -0400 Received: from outbound-smtp11.blacknight.com ([46.22.139.16]:33347 "EHLO outbound-smtp11.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751062AbcERODm (ORCPT ); Wed, 18 May 2016 10:03:42 -0400 Date: Wed, 18 May 2016 15:03:37 +0100 From: Mel Gorman To: Naoya Horiguchi Cc: Vlastimil Babka , Andrew Morton , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Naoya Horiguchi Subject: Re: [PATCH v2] mm: check_new_page_bad() directly returns in __PG_HWPOISON case Message-ID: <20160518140337.GG2527@techsingularity.net> References: <1463470975-29972-1-git-send-email-n-horiguchi@ah.jp.nec.com> <20160518092100.GB2527@techsingularity.net> <573C365B.6020807@suse.cz> <20160518100949.GA17299@hori1.linux.bs1.fc.nec.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20160518100949.GA17299@hori1.linux.bs1.fc.nec.co.jp> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 18, 2016 at 10:09:50AM +0000, Naoya Horiguchi wrote: > From c600b1ee6c36b3df6973f5365b4179c92f3c08e3 Mon Sep 17 00:00:00 2001 > From: Naoya Horiguchi > Date: Wed, 18 May 2016 18:42:57 +0900 > Subject: [PATCH v2] mm: check_new_page_bad() directly returns in __PG_HWPOISON > case > > Currently we check page->flags twice for "HWPoisoned" case of > check_new_page_bad(), which can cause a race with unpoisoning. > This race unnecessarily taints kernel with "BUG: Bad page state". > check_new_page_bad() is the only caller of bad_page() which is interested > in __PG_HWPOISON, so let's move the hwpoison related code in bad_page() > to it. > > Signed-off-by: Naoya Horiguchi Acked-by: Mel Gorman -- Mel Gorman SUSE Labs