Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966607AbdDTJ0S (ORCPT ); Thu, 20 Apr 2017 05:26:18 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:42073 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965875AbdDTJ0N (ORCPT ); Thu, 20 Apr 2017 05:26:13 -0400 From: Laurent Dufour To: Naoya Horiguchi Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org Subject: [RFC 2/2] mm: skip HWPoisoned pages when onlining pages Date: Thu, 20 Apr 2017 11:26:02 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1492680362-24941-1-git-send-email-ldufour@linux.vnet.ibm.com> References: <1492680362-24941-1-git-send-email-ldufour@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17042009-0020-0000-0000-0000034BACC1 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17042009-0021-0000-0000-0000415B5644 Message-Id: <1492680362-24941-3-git-send-email-ldufour@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-20_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1704200076 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 795 Lines: 24 The commit b023f46813cd ("memory-hotplug: skip HWPoisoned page when offlining pages") skip the HWPoisoned pages when offlining pages, but this should be skipped when onlining the pages too. Signed-off-by: Laurent Dufour --- mm/memory_hotplug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 6fa7208bcd56..20e1fadc2369 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -942,6 +942,8 @@ static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages, if (PageReserved(pfn_to_page(start_pfn))) for (i = 0; i < nr_pages; i++) { page = pfn_to_page(start_pfn + i); + if (PageHWPoison(page)) + continue; (*online_page_callback)(page); onlined_pages++; } -- 2.7.4