From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1948013AbdDYO2S (ORCPT ); Tue, 25 Apr 2017 10:28:18 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:33678 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1947997AbdDYO2E (ORCPT ); Tue, 25 Apr 2017 10:28:04 -0400 From: Laurent Dufour To: Naoya Horiguchi Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org Subject: [PATCH v2 2/2] mm: skip HWPoisoned pages when onlining pages Date: Tue, 25 Apr 2017 16:27:52 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493130472-22843-1-git-send-email-ldufour@linux.vnet.ibm.com> References: <1493130472-22843-1-git-send-email-ldufour@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17042514-0012-0000-0000-0000051680D4 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17042514-0013-0000-0000-000018335DB2 Message-Id: <1493130472-22843-3-git-send-email-ldufour@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-25_09:,, 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-1704250262 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 6fa7208bcd56..741ddb50e7d2 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -942,6 +942,10 @@ 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)) { + ClearPageReserved(page); + continue; + } (*online_page_callback)(page); onlined_pages++; } -- 2.7.4